Ejemplo n.º 1
0
        protected NBiConstraint InstantiateConstraint(ContainedInXml ctrXml)
        {
            Member.ContainedInConstraint ctr;
            if (ctrXml.Query != null)
            {
                var builder = new ResultSetResolverArgsBuilder(ServiceLocator);
                builder.Setup(ctrXml.Query);
                builder.Setup(ctrXml.Settings);
                builder.Build();

                var factory  = ServiceLocator.GetResultSetResolverFactory();
                var resolver = factory.Instantiate(builder.GetArgs());
                ctr = new Member.ContainedInConstraint(resolver);
            }
            else if (ctrXml.Members != null)
            {
                var disco = InstantiateMembersDiscovery(ctrXml.Members);
                ctr = new Member.ContainedInConstraint(disco);
            }
            else
            {
                ctr = new Member.ContainedInConstraint(ctrXml.GetItems());
            }

            //Ignore-case if requested
            if (ctrXml.IgnoreCase)
            {
                ctr = ctr.IgnoreCase;
            }
            return(ctr);
        }
Ejemplo n.º 2
0
        protected NBiConstraint InstantiateConstraint(ContainedInXml ctrXml)
        {
            var ctr = new NBi.NUnit.Structure.ContainedInConstraint(ctrXml.GetItems());

            //Ignore-case if requested
            if (ctrXml.IgnoreCase)
            {
                ctr = ctr.IgnoreCase;
            }
            return(ctr);
        }
Ejemplo n.º 3
0
        protected NBiConstraint InstantiateConstraint(ContainedInXml ctrXml)
        {
            NBi.NUnit.Member.ContainedInConstraint ctr;
            if (ctrXml.Query != null)
            {
                ctr = new NBi.NUnit.Member.ContainedInConstraint(ctrXml.Query.GetCommand());
            }
            else if (ctrXml.Members != null)
            {
                var disco = InstantiateMembersDiscovery(ctrXml.Members);
                ctr = new NBi.NUnit.Member.ContainedInConstraint(disco);
            }
            else
            {
                ctr = new NBi.NUnit.Member.ContainedInConstraint(ctrXml.GetItems());
            }

            //Ignore-case if requested
            if (ctrXml.IgnoreCase)
            {
                ctr = ctr.IgnoreCase;
            }
            return(ctr);
        }