Пример #1
0
        public void GalaxyLoadTest()
        {
            TestGalaxyMapDataStreamProvider provider = new TestGalaxyMapDataStreamProvider(".//..//..//..//..//assets");

            provider.Initialize();
            GalaxyMapLoader loader = new GalaxyMapLoader();

            map = loader.LoadGalaxyMap("GalaxyMap", provider);
            Debug.Assert((map.Count > 0), "No starsystem was loaded.");
            Debug.Assert((map.GetStarSystemConnections("Solar System").Count > 0), "Starsystem connections cannot be loaded.");
        }
Пример #2
0
        public PathPlannerTests()
        {
            testShip = new Spaceship(0, "TestShip");
            testPath = new NavPath();
            TestGalaxyMapDataStreamProvider provider = new TestGalaxyMapDataStreamProvider(".//..//..//..//..//assets");

            provider.Initialize();
            GalaxyMapLoader loader = new GalaxyMapLoader();

            map = loader.LoadGalaxyMap("GalaxyMap", provider);
            Debug.Assert((map.Count > 0), "No starsystem was loaded.");
        }
Пример #3
0
        public void StarSystemLoadTest()
        {
            TestGalaxyMapDataStreamProvider provider = new TestGalaxyMapDataStreamProvider(".//..//..//..//Assets");

            provider.Initialize();
            StarSystemLoader loader   = new StarSystemLoader();
            StarSystem       loadedSS = loader.LoadStarSystem("Sol", provider);

            Debug.Assert((loadedSS != null), "Starsystem load failed!");
            Debug.Assert((loadedSS.Name.Equals("Solar system", StringComparison.CurrentCultureIgnoreCase)), "Solar system load failed!");
            Debug.Assert((loadedSS.Star != null), "Solar system star load failed!");
            Debug.Assert((loadedSS.Planets.Count > 0), "Solar system planets load failed!");
            Debug.Assert((loadedSS.WormholeEndpoints.Count > 0), "Solar system wormholeendpoints load failed!");
            Debug.Assert((loadedSS.WormholeEndpoints.Count <= 6), "Solar system contains more then 6 allowed wormoleendpoints!");
        }