Beispiel #1
0
        public static Modset CreateTestModsetWithModsOfOneType(
            Fixture fixture,
            ModType modType,
            int modsNumber = 5)
        {
            var modset = new Modset
            {
                Mods = new HashSet <IMod>()
            };

            for (var i = 0; i < modsNumber; i++)
            {
                modset.Mods.Add(ModHelpers.CreateTestMod(fixture, modType));
            }

            return(modset);
        }
Beispiel #2
0
        public static Modset CreateTestModset(
            Fixture fixture,
            string?modsDirectory  = null,
            int eachModTypeNumber = 5)
        {
            var modset = new Modset
            {
                Mods          = new HashSet <IMod>(),
                Dlcs          = new HashSet <Dlc>(),
                LastUpdatedAt = fixture.Create <DateTime>(),
                Name          = fixture.Create <string>(),
                WebId         = fixture.Create <string>()
            };

            for (var i = 0; i < eachModTypeNumber; i++)
            {
                modset.Mods.Add(ModHelpers.CreateTestMod(fixture, ModType.ServerSide, modsDirectory));
                modset.Mods.Add(ModHelpers.CreateTestMod(fixture, ModType.ClientSide, modsDirectory));
                modset.Mods.Add(ModHelpers.CreateTestMod(fixture, ModType.Optional, modsDirectory));
                modset.Mods.Add(ModHelpers.CreateTestMod(fixture, ModType.Required, modsDirectory));
            }

            return(modset);
        }