Ejemplo n.º 1
0
        public void GetBestBars_NonEmptyList_ReturnsOk()
        {
            // Arrange
            mockUnitOfWork.BarRepository.GetBestBars().Returns(defaultList);

            // Act
            IActionResult result = uut.GetBestBars();

            // Assert
            Assert.That(result, Is.TypeOf <OkObjectResult>());
        }
Ejemplo n.º 2
0
        public void GetBestBars_NoBarsInDatabase_ReturnsNotFound()
        {
            var barController = new BarController(_uow, _mapper);
            var httpResult    = barController.GetBestBars();

            Assert.That(httpResult, Is.TypeOf <NotFoundResult>());
        }