public void GetAll_EmptyDB_WhenCalled_ReturnsOkResult()
        {
            // Act
            var response = _controller.GetAll();

            // Assert
            Assert.AreEqual(typeof(OkObjectResult), response.Result.GetType());
        }
        public async Task EventGetAll_WithValidModel_Return_OkResult()
        {
            //Arrange

            //Act
            var result = await _controller.GetAll();

            //Assert
            Assert.IsType <OkObjectResult>(result);
        }
        public void GetAll_FilledDB_WhenCalled_ReturnsArray()
        {
            // Act
            var response = _controller.GetAll();
            var result   = response.Result as OkObjectResult;

            // Assert
            Assert.IsNotNull(result.Value);
            var events = result.Value as Event[];

            Assert.AreEqual(events.Length, 4);
        }
Пример #4
0
 public IEnumerable <Calendar> GetAll()
 {
     return(calendarController.GetAll());
 }