Exemplo n.º 1
0
        public async Task BeerExists_GivenAnNonExistingBeerId_ShouldReturnFalse()
        {
            //Arrange
            var guid = Guid.NewGuid();

            var mockedBrandQuery = new Mock <IBrandQuery>();

            mockedBrandQuery.Setup(query => query.GetBeer(It.IsAny <Guid>()))
            .ReturnsAsync((Beer)null);

            var brandValidation = new BrandValidation(mockedBrandQuery.Object);

            //Act
            var result = await brandValidation.BeerExists(guid);

            //Assert
            Assert.False(result);
        }