public void EntryDoesNotExist() { var dataFolder = "C:/DataFolder"; var modPaths = new ModKey[] { TestConstants.MasterModKey, TestConstants.MasterModKey2, TestConstants.MasterModKey3, } .Select(x => ModPath.FromPath(Path.Combine(dataFolder, x.FileName))) .ToArray(); var fs = new MockFileSystem( modPaths .Skip(1) .ToDictionary(x => (string)x.Path, x => new MockFileData(string.Empty))); var importer = Substitute.For <IModImporter <TestMod> >(); foreach (var modPath in modPaths) { importer.Import(modPath).Returns(new TestMod(modPath.ModKey)); } var lo = new LoadOrderImporter <TestMod>( fs, new DataDirectoryInjection(dataFolder), new LoadOrderListingsInjection(modPaths.Select(x => x.ModKey).ToArray()), importer) .Import(); lo.Count.Should().Be(3); lo.First().Value.Mod.Should().BeNull(); lo.First().Value.ModKey.Should().Be(TestConstants.MasterModKey); lo.Select(x => x.Value.Mod) .Skip(1) .Should().Equal( modPaths .Skip(1) .Select(x => importer.Import(x))); }