コード例 #1
0
        public static void AuxiliaryFactoryTest(IEntitiesFactory factory)
        {
            //Location
            var inputL = new List<IMeasure> { new SimpleMeasure("ReteA", 10U) };
            var loc = factory.CreateLocation("Location1", inputL);
            Assert.IsInstanceOf<Location>(loc);
            Assert.AreEqual(loc.Name, "Location1");
            loc.TotalTime = TimeVal;
            Assert.AreEqual(loc.TotalTime, TimeVal);

            //Place
            var pla = factory.CreatePlace(inputL);
            Assert.IsInstanceOf<Place>(pla);

            //Location
            var inputS = new SimpleMeasure("ReteA", 10U);
            var net = factory.CreateNetwork(inputS);
            Assert.IsInstanceOf<Network>(net);
            Assert.AreEqual(net.Ssid, "ReteA");
        }
コード例 #2
0
 private IList<Network> MockNetwork()
 {
     var input = new SimpleMeasure("Sitecom", 99U);
     var list = new List<Network> { new GaussianNetwork(input) };
     return list;
 }