Exemplo n.º 1
0
        public void Graph_LoadTest()
        {
            Graph graph = TestGraph.Load("carwash.json");

            Assert.IsNotNull(graph);

            Assert.AreEqual(2, graph.StateVariables.Count);
            Assert.AreEqual(4, graph.Verticies.Count);
            Assert.AreEqual(5, graph.Edges.Count);
        }
Exemplo n.º 2
0
        public void Validator_CarwashFileSimulationValidTest()
        {
            SimulationArgs args = new SimulationArgs(TestGraph.Load("carwash.json"));

            args.StartParameterExpressions.Add("5");
            args.StartParameterExpressions.Add("3");

            Simulation s = new Simulation(args);

            Validator_ValidTest(s);
        }
Exemplo n.º 3
0
        public void Graph_SaveTest()
        {
            Graph graph = TestGraph.Load("carwash.json");

            Assert.IsNotNull(graph);

            MemoryStream ms = new MemoryStream();

            graph.Save(ms);

            Assert.IsNotNull(ms);
            string graphOutput = Encoding.UTF8.GetString(ms.ToArray());

            Assert.IsFalse(string.IsNullOrWhiteSpace(graphOutput));
        }
Exemplo n.º 4
0
 public void Validator_CarwashFileValidTest()
 {
     Validator_ValidTest(TestGraph.Load("carwash.json"));
 }
Exemplo n.º 5
0
 public void CodeGenerator_CarwashFileGenerateSourceValidTest()
 {
     CodeGenerator_GenerateSourceValidTest(TestGraph.Load("carwash.json"));
 }