コード例 #1
0
        public void EventDataSetStream_HasDataAfterFrame_ReturnsFalseOnLastSampleEmptyData()
        {
            EventDataSetStream testStream = new EventDataSetStream();

            testStream.AddSample(0, 1);
            testStream.AddSample(5, 0);
            Assert.AreEqual(false, testStream.HasDataAfterFrame(6), "HasDataAfterFrame returned true when last sample's data is empty and queried frame is past the last sample.");
        }
コード例 #2
0
        public void EventDataSetSTream_HasDataAfterFrame_ReturnsTrueOnLastSampleNonZero()
        {
            EventDataSetStream testStream = new EventDataSetStream();

            testStream.AddSample(0, 1);
            testStream.AddSample(2, 1);
            Assert.AreEqual(true, testStream.HasDataAfterFrame(1), "HasDataAfterFrame returned false when there should be a sample with data following frame 1.");
        }
コード例 #3
0
        public void EventDataSetStream_HasDataAfterFrame_ReturnsFalseOnNoSamples()
        {
            EventDataSetStream testStream = new EventDataSetStream();

            Assert.AreEqual(false, testStream.HasDataAfterFrame(5), "Should have returned true since no samples have been added to the stream. ");
        }