private void Button_Click_1(object sender, RoutedEventArgs e) { if (topHorizonMatrix != null) { volumeCalculator.PillarLength = upDownCellSize.Value.GetValueOrDefault(); volumeCalculator.PillarWidth = upDownCellSize.Value.GetValueOrDefault(); volumeCalculator.BaseHorizonOffset = upDownbhOffset.Value.GetValueOrDefault(); volumeCalculator.FluidContactDepth = upDownfContact.Value.GetValueOrDefault(); switch (((System.Windows.Controls.ComboBoxItem)cmbUnit.SelectedItem).Content) { case "Feet": MessageBox.Show($"Volume in Feet: {volumeCalculator.CalculateVolumeInFeet(topHorizonMatrix)}"); break; case "Meters": MessageBox.Show($"Volume in Meters: {volumeCalculator.CalculateVolumeInMeters(topHorizonMatrix)}"); break; case "Barrels": MessageBox.Show($"Volume in Barrels: {volumeCalculator.CalculateVolumeInBarrels(topHorizonMatrix)}"); break; } } }
public void CalculateVolumeInFeet() { var matrix = CreateAMatrix(5, 5); var result = Subject.CalculateVolumeInFeet(matrix); result.Should().Be(320000); }