mirror of
https://github.com/ow-mods/owml.git
synced 2025-12-11 20:15:48 +01:00
* IoC (inversion of control) container - mostly NOT newing up stuff manually, using an IoC container (Unity - not the game engine) for this. Want a new dependendy for your class? Just put it into your constructor, the container handles the rest. * Tests. Not very thorough yet, but laid the groundwork. * Abstractions for processes, Unity Application class and GameObject creation. Needed for testing, as there's no way to run Unity code from outside of Unity, and for mocking Process calls. * Moved all code to src folder. Tests are in tests folder. * Moved sample mods from OWML.SampleMods to SampleMods. * Dependencies that aren't on NuGet.org are moved to lib folders. * Allowing old OW versions. Just outputting nicer errors instead of quitting. * New Utils project. Contains the container, TypeExtensions (moved from Events) and JsonHelper (moved from ModHelper). * Internal NuGet package (OW and Unity dlls for building OWML on GitHub) is moved to new private GitHub repo and has a new GitHub pipeline. * ModHelper project creates the nuget package - no more OWML.Nuget project. * Launcher project + pipeline creates the release zip - no more createrelease.bat. * New GitHub pipeline for OWML - no more Azure DevOps. * Should still be backwards compatible
28 lines
617 B
C#
28 lines
617 B
C#
using System.Linq;
|
|
using OWML.Tests.Setup;
|
|
using Xunit;
|
|
using Xunit.Abstractions;
|
|
|
|
namespace OWML.ModFinder.Tests
|
|
{
|
|
public class ModFinderTests : OWMLTests
|
|
{
|
|
public ModFinderTests(ITestOutputHelper outputHelper)
|
|
: base(outputHelper)
|
|
{
|
|
}
|
|
|
|
[Fact]
|
|
public void ModFinder_GetMods()
|
|
{
|
|
var modFinder = new ModLoader.ModFinder(Config, Console.Object);
|
|
|
|
var mods = modFinder.GetMods();
|
|
|
|
Assert.True(mods.Count >= 2);
|
|
Assert.Contains("Alek.EnableDebugMode", mods.Select(m => m.Manifest.UniqueName));
|
|
Assert.Contains("Alek.LoadCustomAssets", mods.Select(m => m.Manifest.UniqueName));
|
|
}
|
|
}
|
|
}
|