예제 #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());
 }