public IBookParty GetNextTargetParty(IBookIndex lastIndex) { if (__positionNode == false && __contractNode == true) { return(lastIndex.GetNewContractParty(lastIndex.Code(), lastIndex.CodeOrder())); } else if (__positionNode == true) { return(lastIndex.GetNewPositionParty(lastIndex.Code(), lastIndex.CodeOrder())); } return(lastIndex.GetParty()); }
public void Should_Return_Free_CodeOrder_1_From_Empty_Collection() { IBookIndex[] testArray = new IBookIndex[0]; IBookIndex testIndex = TargetStream.TargetElementBuilder.BuildIndexWithDefault(testArray, partyOne, articleCode1); Assert.AreEqual(codeOrder01, testIndex.CodeOrder()); }
public IBookParty GetPositionParty(IBookIndex element) { if (__positionNode == true) { return(element.GetNewPositionParty(element.Code(), element.CodeOrder())); } return(null); }
public IBookParty GetContractParty(IBookIndex element) { if (__positionNode == false && __contractNode == true) { return(element.GetNewContractParty(element.Code(), element.CodeOrder())); } return(null); }
public void Should_Return_Free_CodeOrder_1_From_Missing_Collection() { IBookIndex[] testArray = new IBookIndex[] { index01, index02, index03, index04, index05, index21, index22, index23, index24, index25, index26, index27, index28, index29 }; IBookIndex testIndex = TargetStream.TargetElementBuilder.BuildIndexWithDefault(testArray, partyOne, articleCode1); Assert.AreEqual(codeOrder01, testIndex.CodeOrder()); }
public void Should_Return_First_CodeOrder_1_With_Missing_8() { IBookIndex[] testArray = new IBookIndex[] { index01, index02, index04, index05, index11, index12, index13, index14, index15, index16, index17, index21, index22, index23, index24, index26, index27, index28, index29 }; IBookIndex testIndex = TargetStream.TargetElementBuilder.BuildIndexWithFirst(testArray, partyOne, articleCode1); Assert.AreEqual(codeOrder01, testIndex.CodeOrder()); }