コード例 #1
0
        public void getArcCategoryFromCategoryTest()
        {
            WebOrderDBBaseItem order = createOrderFromTPCCode(WebMateTestSettings.ThirdPartyCodeKey);
            int arcCategoryKey       = target.getArcCategoryKeyFromCategory(order.Categories.FinancialCategory);

            Assert.IsTrue(arcCategoryKey > 0);
        }
コード例 #2
0
        public void insertOrder_BC_R_ToDBTest()
        {
            WebOrderDBBaseItem order = createBasicOrderFromTPCCode(WebMateTestSettings.ThirdPartyCodeKey);

            order.TabContainerName = getGuidFromWebOrderKey(WebMateTestSettings.WebOrderKey);
            order.TabKey           = getTabKeyForWebOrder(
                WebMateTestSettings.WebOrderKey,
                WebMateTestSettings.WebOrderTabName);
            order.TimeKey     = setTimeKey();
            order.SecurityRef = getNextSecurityRef();
            order.Categories.PrimaryArcCategoryKey = getArcCategoryKeyFromCategory(order.Categories.FinancialCategory);

            bool result = target.insertOrderBaseDataToDB(
                target.connection_,
                target.transaction_,
                ref order);

            result = target.insertOrderBreakdownCategoriesToDB(
                target.connection_,
                target.transaction_,
                order.OrderKey,
                order.Categories);

            WebOrderDBItem dbItem = (WebOrderDBItem)order;

            result = target.insertOrderRecipesToDB(
                target.connection_,
                target.transaction_,
                dbItem.OrderKey,
                dbItem.ItemRecipes);

            Assert.AreEqual(true, result);
        }
コード例 #3
0
        public void isDuplicateOrderTest()
        {
            WebOrderDBBaseItem orderDbItem = createOrderDbItem(WebMateTestSettings.ThirdPartyCodeKey);
            bool expected = false;
            bool actual;

            actual = target.isDuplicateOrder((WebOrderDBItem)orderDbItem);
            Assert.AreEqual(expected, actual);
        }