Ejemplo n.º 1
0
        public void ShouldFillWater_Success()
        {
            // Arrange
            var waterTank = new WaterTank(capacity: 1000m);

            // Act
            waterTank.Fill(300m);

            // Assert
            waterTank.CurrentVolume.Should().Be(300m);
        }
Ejemplo n.º 2
0
        public void ShouldDrainWater_Success()
        {
            // Arrange
            var waterTank = new WaterTank(capacity: 1000m);

            waterTank.Fill(300m);

            // Act
            var drainedVolume = waterTank.Drain(100m);

            // Assert
            drainedVolume.Should().Be(100m);
            waterTank.CurrentVolume.Should().Be(200m);
        }