一部のBizTalk2006R2ヘルパーコードをBizTalk2010に変換しようとしていますが、特有の問題が発生しています。2006 R2-> 2010からAPIが大幅に変更されたメソッドを単体テストしようとしていますが、パーティのバッチにアクセスしようとすると、次の例外が発生し続けます。
System.Data.SqlClient.SqlException: Could not find stored procedure 'edi_PartnerBatchScheduleSelect'.
コード:
[TestMethod()]
public void GetPartyBatchStatusTest()
{
Assert.IsTrue(GetPartyBatchStatus("Party1"));
}
public bool GetPartyBatchStatus(string PartyName)
{
if (string.IsNullOrEmpty(PartyName))
{
// Throw Exception
throw new System.ArgumentException("Parameter PartyName cannot be null or empty in the GetPartyBatchStatus method.", "PartyName");
}
bool RetVal = false;
Partner objPartner = new Partner(PartyName);
if (objPartner.PartyId != -1)
{
foreach (IPartnerBatch batch in objPartner.Batches.Batches)
{
RetVal = batch.BatchingActivated;
}
}
return RetVal;
}
このテストケースでは、Party1とParty2を設定し、それらの間でバッチを開始しました。