Ejemplo n.º 1
0
        public void metro3Test()
        {

            // Arrange
            METRO3Controller controller = new METRO3Controller();
            //Act
            ViewResult result = controller.metro3() as ViewResult;
            //Assert 
            Assert.IsNotNull(result);

        }
Ejemplo n.º 2
0
        public void metro3GetTest( string S)
        {

         
            //Arange
            string request = "SPANSKO";
            MyModel3 expected = new MyModel3() { count = 2,  roudtrips = new string[] { "SPANSKO-MEDVESCAK-SPANSKO", "SPANSKO-DUBRAVA-SIGET-SPANSKO" } };

            METRO3Controller controller = new METRO3Controller();

            //Act
            JsonResult result = controller.metro3Get(request) as JsonResult;
            string Json = new JavaScriptSerializer().Serialize(result.Data);
            string expectedJson = new JavaScriptSerializer().Serialize(expected);
          
        
           // Assert
           Assert.IsNotNull(result);
           Assert.AreEqual(expectedJson, Json);
        }