Example #1
0
        public void LoadsUnitsCountry()
        {
            HashSet <string> allCountries = new HashSet <string> {
                "US", "UK", "FR", "RFA", "CAN", "DAN", "SWE", "NOR", "URSS", "RDA", "POL", "TCH", "NK", "ROK", "CHI", "JAP", "ANZ", "HOL", "ISR", "FIN", "YUG"
            };
            List <WargameUnit> units = new List <WargameUnit>(database.GetOtanUnits());

            units.AddRange(database.GetPactUnits());

            foreach (var unit in units)
            {
                Assert.IsTrue(allCountries.Contains(unit.Country), unit.Country + ": Not a valid country. UnitId: " + unit.UnitId);
            }
        }
Example #2
0
 static public void ClassInit(TestContext context)
 {
     database = new NdfDatabase("NDF_Win.dat");
     units    = database.GetOtanUnits();
 }