public void FirstAsfObjectShouldNotBeUnknownFailsBecauseIsNotFirst() { // ASF-object is known and parent is root and already has children With.Mocks(_mockRepository).Expecting(delegate { _childAsfObject.Stub(x => x.HeaderName).Return(AsfObjectName.HeaderObject); _parentAsfObject.Stub(x => x.IsRoot).Return(true); _parentAsfObject.Stub(x => x.Children).Return(Enumerable.Repeat(_childAsfObject as IResultNode, 1).ToList()); _asfObject.Stub(x => x.HeaderName).Return(AsfObjectName.DataObject); _asfObject.Stub(x => x.IsUnknown).Return(true); }).Verify(delegate { Assert.IsTrue(_asfObject.IsSuitableParent(_parentAsfObject)); }); }
public void BetweenParentOffsetBondries() { With.Mocks(_mockRepository).Expecting(delegate { _parentAsfObject.Stub(x => x.IsRoot).Return(false); _parentAsfObject.Stub(x => x.Offset).Return(0L); _parentAsfObject.Stub(x => x.RelativeEndOffset).Return(200L); _asfObject.Stub(x => x.Offset).Return(10L); _asfObject.Stub(x => x.RelativeEndOffset).Return(100L); _asfObject.Stub(x => x.HeaderName).Return(AsfObjectName.HeaderObject); _asfObject.Stub(x => x.IsUnknown).Return(false); }).Verify(delegate { Assert.IsTrue(_asfObject.IsSuitableParent(_parentAsfObject)); }); }