Beispiel #1
0
        public async Task UpdateTransactionTypeAsync_Successfully_Updated()
        {
            //Arrange
            var id      = 4;
            var service = new TransactionTypeService(_myRestaurantContext);

            //Act
            var dbTransactionType = await service.GetTransactionTypeAsync(d => d.Id == id);

            dbTransactionType !.Type = "Mortgage/Rent";

            await service.UpdateTransactionTypeAsync(dbTransactionType);

            var result = await service.GetTransactionTypeAsync(d => d.Id == id);

            //Assert
            result.Should().BeAssignableTo <TransactionType>();
            result !.Id.Should().Be(id);
            result.Type.Should().Be("Mortgage/Rent");
        }