public void SpectrumVisualizer_CanSetSource() { FakeVisualizationSource source = new FakeVisualizationSource(); sut.Source = source; Assert.AreEqual(source, sut.Source); }
public void AnalogVUMeter_CanSetSource() { FakeVisualizationSource source = new FakeVisualizationSource(); sut.Source = source; Assert.AreEqual(source, sut.Source); }
public void DiscreteVUBar_CanSetSource() { FakeVisualizationSource source = new FakeVisualizationSource(); sut.Source = source; Assert.AreEqual(source, sut.Source); }
public void TestInitialize() { sut = new SourceConverter(); testSource = new FakeVisualizationSource(); sut.Source = testSource; propertiesChanged = new List <string>(); sut.ConfigurationChanged += new TypedEventHandler <IVisualizationSource, string>( (sender, property) => { propertiesChanged.Add(property); } ); }
public void SourceConverter_Property_Source() { FakeVisualizationSource fakeSource = new FakeVisualizationSource(); sut.Source = fakeSource; Assert.AreEqual(fakeSource, sut.Source); CollectionAssert.AreEqual(new string[] { "Source" }, propertiesChanged, "Change notification missing assigning Source property"); sut.Source = fakeSource; CollectionAssert.AreEqual(new string[] { "Source" }, propertiesChanged, "Invalid change notification when assigning same value to Source"); sut.Source = null; CollectionAssert.AreEqual(new string[] { "Source", "Source" }, propertiesChanged, "Change notification missing assigning null to Source property"); sut.Source = null; CollectionAssert.AreEqual(new string[] { "Source", "Source" }, propertiesChanged, "Invalid change notification when assigning same value (null) to Source"); }
public void TestInit() { sut = new SourceConverter(); testSource = new FakeVisualizationSource(); testSource.ExpectedChannels = expectedChannelCount; sut.Source = testSource; testFrame = new VisualizationDataFrame( TimeSpan.Zero, TimeSpan.FromMilliseconds(16.7), ScalarData.CreateEmpty(expectedChannelCount), ScalarData.CreateEmpty(expectedChannelCount), SpectrumData.CreateEmpty(expectedChannelCount, 10, ScaleType.Linear, ScaleType.Linear, 0, 10000)); testSource.Frame = testFrame; }
public void TestInit() { sut = new SourceConverter(); testSource = new FakeVisualizationSource(); sut.Source = testSource; testFrame = new VisualizationDataFrame( expectedTime, expectedDuration, ScalarData.CreateEmpty(expectedChannelCount), ScalarData.CreateEmpty(expectedChannelCount), SpectrumData.CreateEmpty(expectedChannelCount, expectedFrequencyCount, ScaleType.Linear, ScaleType.Linear, expectedMinFrequency, expectedMaxFrequency) ); otherFrame = new VisualizationDataFrame( expectedTime.Add(expectedDuration), expectedDuration, ScalarData.CreateEmpty(expectedChannelCount), ScalarData.CreateEmpty(expectedChannelCount), SpectrumData.CreateEmpty(expectedChannelCount, expectedFrequencyCount, ScaleType.Linear, ScaleType.Linear, expectedMinFrequency, expectedMaxFrequency) ); testSource.Frame = testFrame; }