コード例 #1
0
        public void InitializationWihtAxisItemByParamAndComparator()
        {
            Order Item = new Order(MDXTextUtil.GetMoqMDXAxisItem());
            Item.OrderComparator = MDXTextUtil.GetDummySalesMeasure();

            Assert.AreEqual("ORDER (" + MDXTextUtil.GetDummyMember() + ", " + MDXTextUtil.GetDummySalesMeasure() + ")", Item.Build());
        }
コード例 #2
0
        public void InitializationWihtAxisItemByParam()
        {
            Order Item = new Order(MDXTextUtil.GetMoqMDXAxisItem());

            Assert.Throws(Is.TypeOf<MDXException>()
                            .And.Message.EqualTo(MDXTextUtil.GetMessageErrorBaseNotInit(Item)),
                            () => Item.Build());
        }
コード例 #3
0
        public void InitializationShouldbeEmpty()
        {
            Order Item = new Order(null);

            Assert.Throws(Is.TypeOf<MDXException>()
                            .And.Message.EqualTo(MDXTextUtil.GetMessageErrorBaseNotInit(Item)),
                            () => Item.Build());
        }
コード例 #4
0
 public void InitializationWihtAxisItemByParamAndComparatorAndDescType()
 {
     Order Item = new Order(MDXTextUtil.GetMoqMDXAxisItem());
     Item.OrderComparator = MDXTextUtil.GetDummySalesMeasure();
     Item.TypeOrder = Order.OrderType.DESC;
     string expect = "ORDER (" + 
         MDXTextUtil.GetDummyMember() + ", " + 
         MDXTextUtil.GetDummySalesMeasure() + ", " + 
         Order.OrderType.DESC.ToString() + ")";
     Assert.AreEqual(expect, Item.Build());
 }