Exemple #1
0
        public void bind_abstract_builder_types()
        {
            // Demonstrates that the builder indirection can be used on abstract types

            PropertyTreeReader pt = LoadContent("epsilon-chi-builder.xml");

            Assert.True(pt.Read());

            EpsilonChi e = pt.Bind <EpsilonChi>();

            Assert.IsInstanceOf <EpsilonChiAlpha>(e);
        }
Exemple #2
0
        public void bind_abstract_builder_types_xmlns_lookup_and_builder()
        {
            // Checks that xmlns prefixes can be expanded and that the builder is used
            PropertyTreeReader pt = LoadContent("epsilon-chi-builder-2.xml");

            Assert.True(pt.Read());

            var        tup = pt.Bind <Tuple <EpsilonChi, Upsilon> >();
            EpsilonChi e   = tup.Item1;
            Upsilon    u   = tup.Item2;

            Assert.IsInstanceOf <EpsilonChiAlpha>(e);
            Assert.Equal('q', ((EpsilonChiAlpha)e)._M);

            Assert.Equal('r', ((EpsilonChiAlpha)u.C)._M);
        }