getSubtree() public method

public getSubtree ( string key ) : PipeHdfContext
key string
return PipeHdfContext
Exemplo n.º 1
0
        public void T01_PipeHdfContext()
        {
            PipeHdfContext ctx2 = new PipeHdfContext();
            ctx2.setQualifier("blah", "1");

            PipeHdfContext ctx = new PipeHdfContext();
            ctx.setQualifier("foo", "bar");
            ctx.setQualifier("baz", "blah");
            ctx.setSubtree("baz", ctx2);

            Assert.AreEqual(new QualifierExact("bar"), ctx.getQualifier("foo", "deffoo"));
            Assert.AreEqual(new QualifierExact("blah"), ctx.getQualifier("baz", "defblah"));
            Assert.AreEqual(new QualifierExact("def not present"), ctx.getQualifier("notpresent", "def not present"));

            Assert.AreEqual(ctx2, ctx.getSubtree("baz"));
        }