Beispiel #1
0
        public void EditShouldReturnFalseIfItIsNotSuccessfull()
        {
            // Arrange
            var breweryService = new AdminBreweryService(this.db);

            // Act
            var result = breweryService.Edit(1, "test", "test", 1);

            // Assert
            result
            .Should()
            .BeFalse();
        }
Beispiel #2
0
        public void EditShouldReturnTrueIfItIsSuccessfull()
        {
            // Arrange
            var first = new Brewery {
                Id = 1, Name = "First"
            };

            this.db.Breweries.Add(first);
            this.db.SaveChanges();

            var breweryService = new AdminBreweryService(this.db);

            // Act
            var result = breweryService.Edit(1, "test", "test", 1);

            // Assert
            result
            .Should()
            .BeTrue();
        }