Exemplo n.º 1
0
        public void CreateOrderedEnumerable_Malformed_Weird()
        {
            // emptyOrdered
            {
                var e = new EmptyOrderedEnumerable <int>();

                try
                {
                    e.CreateOrderedEnumerable(null, new _CreateOrderedEnumerable(), true);
                    Assert.Fail();
                }
                catch (ArgumentException exc)
                {
                    Assert.AreEqual("source", exc.ParamName);
                }
            }

            // oneItemDefaultOrdered
            {
                var e = new OneItemDefaultOrderedEnumerable <int>();

                try
                {
                    e.CreateOrderedEnumerable(null, new _CreateOrderedEnumerable(), true);
                    Assert.Fail();
                }
                catch (ArgumentException exc)
                {
                    Assert.AreEqual("source", exc.ParamName);
                }
            }

            // oneItemSpecificOrdered
            {
                var e = new OneItemSpecificOrderedEnumerable <int>();

                try
                {
                    e.CreateOrderedEnumerable(null, new _CreateOrderedEnumerable(), true);
                    Assert.Fail();
                }
                catch (ArgumentException exc)
                {
                    Assert.AreEqual("source", exc.ParamName);
                }
            }
        }