예제 #1
0
        public void Should_ThrowAnError_When_ChangeTankIsCalledWithNegative()
        {
            // Arrange
            Beer beer = new Beer(12, "Special Honey Beer", 400);

            // Act
            Action act = () => beer.ChargeTank(-1);

            // Assert
            Assert.Throws <LitersChargeNegativeException>(act);
        }
예제 #2
0
        public void Should_Add10Liters_When_ChargeTankIsCalled()
        {
            // Arrange
            Beer beer = new Beer(12, "Special Honey Beer", 400);

            // Act
            beer.ChargeTank(10);

            // Assert
            Assert.Equal(410, beer.LitersAvailable);
        }