public void aliasPrefixTest3() { using (dynamic l = new ConariX(UNLIB_DLL, true, "apiprefix_")) { bool expected = false; var pa = new ProcAlias("apiprefix_GFlag", new AliasCfg() { NoPrefixR = true }); l.Aliases["GF"] = l.Aliases["apiprefix_GF"] = pa; Assert.Equal(expected, l.ExVar.get <bool>("apiprefix_GF")); Assert.Equal(expected, l.ExVar.getVar <bool>("GF")); Assert.Equal(expected, l.ExVar.getField <bool>("GF").value); Assert.Equal(expected, l.ExVar.getField(typeof(bool), "GF").value); } }
public void aliasPrefixTest5() { using (var l = new ConariL(UNLIB_DLL)) { var pa = new ProcAlias("apiprefix_GFlag", new AliasCfg() { NoPrefixR = true }); l.Aliases["one"] = l.Aliases["two"] = pa; bool exp = false; l.Prefix = "apiprefix_"; Assert.AreEqual(exp, l.ExVar.DLR.one <bool>()); l.Prefix = ""; Assert.AreEqual(exp, l.ExVar.DLR.one <bool>()); } }
public void aliasPrefixTest2() { using (var l = new ConariL(UNLIB_DLL, "apiprefix_")) { bool expected = false; var pa = new ProcAlias("apiprefix_GFlag", new AliasCfg() { NoPrefixR = true }); l.Aliases["GF"] = l.Aliases["apiprefix_GF"] = pa; Assert.AreEqual(expected, l.ExVar.DLR.GF <bool>(), "1"); Assert.AreEqual(expected, l.ExVar.get <bool>("GF"), "2"); Assert.AreEqual(expected, l.ExVar.getVar <bool>("apiprefix_GF"), "3"); Assert.AreEqual(expected, l.ExVar.getField <bool>("apiprefix_GF").value, "4"); Assert.AreEqual(expected, l.ExVar.getField(typeof(bool), "apiprefix_GF").value, "5"); } }
public void aliasPrefixTest5() { using (dynamic l = new ConariX(gCfgUnlib)) { var pa = new ProcAlias("apiprefix_GFlag", new AliasCfg() { NoPrefixR = true }); l.Aliases["one"] = l.Aliases["two"] = pa; bool exp = false; l.Prefix = "apiprefix_"; Assert.Equal(exp, l.V.one <bool>()); Assert.Equal(exp, l.ExVar.DLR.one <bool>()); l.Prefix = ""; Assert.Equal(exp, l.V.one <bool>()); Assert.Equal(exp, l.ExVar.DLR.one <bool>()); } }