Skip to content

Commit

Permalink
Merge pull request #52 from VirtualPhotonics/feature/51-clean-up-the-…
Browse files Browse the repository at this point in the history
…plotview-model

Code cleanup of PlotViewModel
  • Loading branch information
Lisa Malenfant authored Feb 15, 2024
2 parents a8d6d5f + 649c0c2 commit b225679
Show file tree
Hide file tree
Showing 2 changed files with 209 additions and 215 deletions.
8 changes: 6 additions & 2 deletions Vts.Gui.Wpf.Test/ViewModel/Panels/PlotViewModelTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,10 @@ public void Verify_curve_normalization()
}

[Test]
public void Verify_max_normalization_complex()
[TestCase(PlotToggleType.Complex)]
[TestCase(PlotToggleType.Phase)]
[TestCase(PlotToggleType.Amp)]
public void Verify_max_normalization_phase_amp_complex(PlotToggleType toggleType)
{
IDataPoint[] points = {
new ComplexDataPoint(0, new Complex(0, 1)),
Expand All @@ -520,9 +523,10 @@ public void Verify_max_normalization_complex()
var plotData = new[] { new PlotData(points, "Complex plot") };
var windowViewModel = new WindowViewModel();
var plotViewModel = windowViewModel.PlotVM;
plotViewModel.PlotToggleTypeOptionVm.SelectedValue = toggleType;
plotViewModel.PlotValues.Execute(plotData);
plotViewModel.PlotValues.Execute(plotData);
Assert.AreEqual(4, plotViewModel.PlotModel.Series.Count);
Assert.AreEqual(toggleType == PlotToggleType.Complex ? 4 : 2, plotViewModel.PlotModel.Series.Count);
plotViewModel.PlotNormalizationTypeOptionVm.SelectedValue = PlotNormalizationType.RelativeToMax;
var plotSeries = plotViewModel.PlotSeriesCollection[0];
var i = 0;
Expand Down
Loading

0 comments on commit b225679

Please sign in to comment.