public void GetSolarSystem() { SolarSystemFactory factory = new SolarSystemFactory(); Assert.AreEqual(factory.CreateSunSolarSystem().Name.ToString(), "Sun Solar System"); Assert.AreEqual(factory.CreateAuroraSolarSystem().Name.ToString(), "Aurora Solar System"); }
//Fabric Methods //On nie jest tu potrzebny, uzylem zeby zwiekszysc ilosc wzorcow! :) public void CreateNormalGalaxy() { try { ISolarSystemFactory factory = new SolarSystemFactory(); List <SolarSystem> list = new List <SolarSystem>(); list.Add(factory.CreateAuroraSolarSystem()); list.Add(factory.CreateSunSolarSystem()); Speed = 10; Vector = new Tuple <double, double>(2, 3); Coordinates = new Tuple <double, double>(300, 300); _solarSystems = list; } catch (Exception e) { throw new System.Exception($"Class {this.GetType().Name}, method {System.Reflection.MethodBase.GetCurrentMethod().Name}" + e.Message); } }