コード例 #1
0
        public void SpectrumVisualizer_CanSetSource()
        {
            FakeVisualizationSource source = new FakeVisualizationSource();

            sut.Source = source;
            Assert.AreEqual(source, sut.Source);
        }
コード例 #2
0
        public void AnalogVUMeter_CanSetSource()
        {
            FakeVisualizationSource source = new FakeVisualizationSource();

            sut.Source = source;
            Assert.AreEqual(source, sut.Source);
        }
コード例 #3
0
        public void DiscreteVUBar_CanSetSource()
        {
            FakeVisualizationSource source = new FakeVisualizationSource();

            sut.Source = source;
            Assert.AreEqual(source, sut.Source);
        }
コード例 #4
0
        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);
            }
                );
        }
コード例 #5
0
        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");
        }
コード例 #6
0
        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;
        }
コード例 #7
0
        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;
        }