Example #1
0
        public void ListValidator1(object o)
        {
            var root     = (Object10i)o;
            var list     = (List <Element>)root.Object1;
            var nameList = list.Cast <ColorElement>().Select(ce => ce.ColorName).ToList();

            Assert.AreEqualOrdered(nameList, "Red", "Green", "Blue", "White", "Green", "Black", "Black");
        }
Example #2
0
        public void Validator5(object o)
        {
            var dict = (OrderedDictionary <StringKey, ResourceWithNameableKey>)o;
            var keys = dict.Select(kvp => kvp.Key.ToString()).ToList();

            Assert.AreEqualOrdered(keys, "FooKey");
            var values = dict.Select(kvp => kvp.Value.SomeData2.ToString()).ToList();

            Assert.AreEqualOrdered(values, "FooKey");
        }
Example #3
0
        public void DictValidator(object o)
        {
            var root = (Object10i)o;
            var dict = (OrderedDictionary <Object, Resource>)root.Object1;
            var keys = dict.Select(kvp => kvp.Key.ToString()).ToList();

            Assert.AreEqualOrdered(keys, "FooKey", "BarKey", "BazKey", "BazKey2", "QuxKey", "QuxKey2", "QuuxKey");
            var values = dict.Select(kvp => kvp.Value.SomeData).ToList();

            Assert.AreEqualOrdered(values, "Foo", "Bar", "Baz", "Baz", "Qux", "Qux", "Quux");
        }