private void CreateLDAPEnabledOfflinePreRoutingSet() { Append(new NxComment("Pre-routing offline enabled")); NxObjectLookup isLdapEnabled = new NxObjectLookup(Guid.NewGuid().ToString(), "LDAPAnalyzer", "IsLdapEnabled"); NxLogic nxLogic = new NxLogic(); NxIf nxIf = new NxIf(); NxAnd nxAnd = new NxAnd(); NxIsTrue nxIsTrue = new NxIsTrue(isLdapEnabled.Identifier); NxDo nxDo = new NxDo(); nxAnd.Append(nxIsTrue); nxIf.Append(nxAnd); nxDo.Append(new NxComment("Online routing")); nxDo.Append(new NxEvaluate("RuleFired", BuildRuleFiredParameters())); nxIf.Append(nxDo); nxLogic.Append(nxIf); NxElse nxElse = new NxElse(); nxElse.Append(new NxComment("Offline routing")); nxElse.Append(new NxEvaluate("RuleFired", BuildOfflineRuleFiredParameters())); nxLogic.Append(nxElse); Append(isLdapEnabled); AppendLogic(nxLogic); }
public void TestCreateWithNoParameters() { NxObjectLookup ol = new NxObjectLookup("AB682E38-BAEB-487a-8866-D2A925D516D3", "this", "MemberFunction"); Assert.AreEqual(ol.Identifier, "AB682E38-BAEB-487a-8866-D2A925D516D3", "The identifier should be the same as the id"); string actual = ol.Create().OuterXml; string expected = "<ObjectLookup id=\"AB682E38-BAEB-487a-8866-D2A925D516D3\" objectId=\"this\" member=\"MemberFunction\" />"; Assert.AreEqual(expected, actual); }
public void TestCreateWithSingleArgument() { NxObjectLookup ol = new NxObjectLookup("AB682E38-BAEB-487a-8866-D2A925D516D3", "this", "MemberFunction", new NxArgument("argument value", false)); Assert.AreEqual(ol.Identifier, "AB682E38-BAEB-487a-8866-D2A925D516D3", "The identifier should be the same as the id"); string actual = ol.Create().OuterXml; StringBuilder sb = new StringBuilder(); sb.Append("<ObjectLookup id=\"AB682E38-BAEB-487a-8866-D2A925D516D3\" objectId=\"this\" "); sb.Append("member=\"MemberFunction\">"); sb.Append("<Argument value=\"argument value\" />"); sb.Append("</ObjectLookup>"); string expected = sb.ToString(); Assert.AreEqual(expected, actual); }
public Lookup(Guid id, NxObjectLookup obj, bool trusted) { Identifier = id; ObjectLookup = obj; Trusted = trusted; }