private void When_setting_negative_capacity_it_must_fail()
        {
            // Arrange
            FakeVolumeInfoBuilder builder = new FakeVolumeInfoBuilder()
                                            .OfCapacity(-1);

            // Act
            Action action = () => builder.Build();

            // Assert
            action.Should().ThrowExactly <ArgumentOutOfRangeException>().WithMessage("Volume capacity cannot be negative.*");
        }
        private void When_setting_negative_used_space_it_must_fail()
        {
            // Arrange
            FakeVolumeInfoBuilder builder = new FakeVolumeInfoBuilder()
                                            .WithUsedSpace(-1);

            // Act
            Action action = () => builder.Build();

            // Assert
            action.Should().ThrowExactly <ArgumentOutOfRangeException>().WithMessage(
                "Used space cannot be negative or exceed volume capacity.*");
        }
        private void When_setting_free_space_higher_than_capacity_it_must_fail()
        {
            // Arrange
            FakeVolumeInfoBuilder builder = new FakeVolumeInfoBuilder()
                                            .OfCapacity(1000)
                                            .WithFreeSpace(1001);

            // Act
            Action action = () => builder.Build();

            // Assert
            action.Should().ThrowExactly <ArgumentOutOfRangeException>().WithMessage(
                "Free space cannot be negative or exceed volume capacity.*");
        }
        private void When_building_with_defaults_it_must_succeed()
        {
            // Arrange
            var builder = new FakeVolumeInfoBuilder();

            // Act
            FakeVolumeInfo volume = builder.Build();

            // Assert
            volume.CapacityInBytes.Should().Be(1073741824);
            volume.FreeSpaceInBytes.Should().Be(1073741824);
            volume.Type.Should().Be(DriveType.Fixed);
            volume.Format.Should().Be("NTFS");
            volume.Label.Should().BeEmpty();
        }