Exemplo n.º 1
0
        public void GetPlanet()
        {
            Console.WriteLine("Get Planet Test:");

            DomainServiceRepository repo = new DomainServiceRepository();

            Console.WriteLine(repo.GetPlanetByName("Earth").Name + "\n");
        }
Exemplo n.º 2
0
        public void GetStar()
        {
            Console.WriteLine("Get Star Test:");

            DomainServiceRepository repo = new DomainServiceRepository();

            Console.WriteLine(repo.GetStarByName("Dubhe").Name + "\n");
        }
Exemplo n.º 3
0
        public void GetAllPlanets()
        {
            Console.WriteLine("Get All Planets Test: ");

            DomainServiceRepository repo = new DomainServiceRepository();

            List <PlanetModel> planets = repo.GetAllPlanets();

            foreach (PlanetModel planet in planets)
            {
                Console.WriteLine(planet.Name);
            }
        }
Exemplo n.º 4
0
        public void GetAllStars()
        {
            Console.WriteLine("Get All Stars Test: ");

            DomainServiceRepository repo = new DomainServiceRepository();

            List <StarModel> stars = repo.GetAllStars();

            foreach (StarModel star in stars)
            {
                Console.WriteLine(star.Name);
            }
        }
Exemplo n.º 5
0
        public void GetSolarSystem()
        {
            Console.WriteLine("Get Solar System Test:");

            DomainServiceRepository repo        = new DomainServiceRepository();
            SolarSystemModel        solarSystem = repo.GetSolarSystemByName("The Solar System");

            Console.WriteLine("The Solar System Planets: ");

            foreach (PlanetModel planet in solarSystem.Planets)
            {
                Console.WriteLine(planet.Name);
            }

            Console.WriteLine("");
        }
Exemplo n.º 6
0
        public void GetConstellation()
        {
            Console.WriteLine("Get Constellation Test:");

            DomainServiceRepository repo      = new DomainServiceRepository();
            ConstellationModel      bigDipper = repo.GetConstellationByName("Ursa Major");

            Console.WriteLine("Big Dipper Stars: ");

            foreach (StarModel star in bigDipper.Stars)
            {
                Console.WriteLine(star.Name);
            }

            Console.WriteLine("");
        }
Exemplo n.º 7
0
        public void GetAllSolarSystems()
        {
            Console.WriteLine("Get All Solar Systems Test: ");

            DomainServiceRepository repo = new DomainServiceRepository();

            List <SolarSystemModel> solarSystems = repo.GetAllSolarSystems();

            foreach (SolarSystemModel solarSystem in solarSystems)
            {
                Console.WriteLine(solarSystem.Name);

                foreach (PlanetModel planet in solarSystem.Planets)
                {
                    Console.WriteLine(planet.Name);
                }
            }
        }
Exemplo n.º 8
0
        public void GetAllConstellations()
        {
            Console.WriteLine("Get All Constellations Test: ");

            DomainServiceRepository repo = new DomainServiceRepository();

            List <ConstellationModel> Constellations = repo.GetAllConstellations();

            foreach (ConstellationModel constellation in Constellations)
            {
                Console.WriteLine(constellation.Name);

                foreach (StarModel star in constellation.Stars)
                {
                    Console.WriteLine(star.Name);
                }
            }
        }