public void EventDataSet_HasDataAfterFrame_ProperBehaviorOnChildHasNoStreamCase() { EventDataSet parentSet = new EventDataSet(); EventDataSet childSet = new EventDataSet(); Assert.AreEqual(false, parentSet.HasDataAfterFrame(0), "HasDataAfterFrame should always be false for a dataset with no streams and no children."); Assert.AreEqual(false, childSet.HasDataAfterFrame(0), "HasDataAfterFrame should always be false for a dataset with no streams and no children."); parentSet.AddChild(childSet); Assert.AreEqual(false, parentSet.HasDataAfterFrame(0), "HasDataAfterFrame should always be false for a dataset with no streams and a child that has no samples/streams."); }
public void EventDataSet_HasDataAfterFrame_ProperBehaviorOnChildHasStreamCase() { EventDataSet parentSet = new EventDataSet(); EventDataSet childSet = new EventDataSet(); childSet.AddSample(0, 0, 1); Assert.AreEqual(false, parentSet.HasDataAfterFrame(0), "HasDataAfterFrame should always be false for a dataset with no streams and no children."); Assert.AreEqual(true, childSet.HasDataAfterFrame(0), "HasDataAfterFrame should return true because the last sample of one of it's streams is nonzero."); parentSet.AddChild(childSet); Assert.AreEqual(true, parentSet.HasDataAfterFrame(0), "HasDataAfterFrame returned false even though a child EventDataSet has data past frame 0."); }
public void EventDataSet_HasDataAfterFrame_ProperBehaviorOnNoChildCase() { EventDataSet parentSet = new EventDataSet(); parentSet.AddSample(0, 0, 1); Assert.AreEqual(true, parentSet.HasDataAfterFrame(0), "Returned false despite the fact that the last frame of the stream should be nonzero."); }