Exemplo n.º 1
0
        public async Task GetPackageByIdTest()
        {
            //Arrange
            var id      = 14;
            var package = new Package {
                Id = id
            };

            _packageRepositoryMock.Setup(x => x.GetPackageById(It.IsAny <int>())).ReturnsAsync(package);
            //Act
            var controller = new PackagesController(_packageRepositoryMock.Object);
            var result     = await controller.GetPackageById(id);

            //Assert
            Assert.NotNull(result);
        }