예제 #1
0
        public void GetAll()
        {
            // Arrange
            ValuesController controller = new ValuesController();

            // Act
            List <Employees> result = controller.GetAll() as List <Employees>;

            // Assert
            Assert.IsNotNull(result);
        }
예제 #2
0
 public void DeberiaDevolverTodasLasPersonas()
 {
     //  arrange
     var fakepersonadal = new FakePersonaDal();
     var fakesender     = new Fakesender();
     var controller     = new ValuesController(fakesender, fakepersonadal);
     //act
     var personas = controller.GetAll();
     //assert
     // Assert.AreEqual(null, personas);
     // preguntar a franco por test
 }
예제 #3
0
        void InitialTest()
        {
            var _valuesController = new ValuesController(null, null, null, null, null, null, null)
            {
                ControllerContext = new ControllerContext()
                {
                    HttpContext = new DefaultHttpContext()
                    {
                        Request =
                        {
                            Method = HttpMethods.Get,
                            Host   = new HostString("http://localhost:53992"),
                            Path   = "api/values"
                        }
                    }
                }
            };

            var result = _valuesController.GetAll();

            Assert.Equal(2, result.Count());
        }