Example #1
0
        public void EnableOne(
            MockFileSystem mockFileSystem,
            IDataDirectoryProvider dataDirectoryProvider)
        {
            var adder = new EnableImplicitMasters(GetImplicitlyIncluded(
                                                      mockFileSystem,
                                                      dataDirectoryProvider,
                                                      new Listing(ModA),
                                                      new Listing(ModB, ModA, ModC),
                                                      new Listing(ModC)));
            var list = new List <IModListingGetter>()
            {
                new ModListing(ModA, true),
                new ModListing(ModC, false),
                new ModListing(ModB, true),
            };

            adder.Add(list);
            list.Should().HaveCount(3);
            list.All(x => x.Enabled).Should().BeTrue();
        }
Example #2
0
        public void SkipUnreferenced(
            MockFileSystem mockFileSystem,
            IDataDirectoryProvider dataDirectoryProvider)
        {
            var adder = new EnableImplicitMasters(GetImplicitlyIncluded(
                                                      mockFileSystem,
                                                      dataDirectoryProvider,
                                                      new Listing(ModA),
                                                      new Listing(ModB, ModA)));
            var list = new List <IModListingGetter>()
            {
                new ModListing(ModA, true),
                new ModListing(ModC, false),
                new ModListing(ModB, true),
            };

            adder.Add(list);
            list.Should().HaveCount(3);
            list.Select(x => x.Enabled).ToArray().Should().Equal(
                true, false, true);
        }