public void GetAll() { // Arrange ValuesController controller = new ValuesController(); // Act List <Employees> result = controller.GetAll() as List <Employees>; // Assert Assert.IsNotNull(result); }
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 }
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()); }