Ejemplo n.º 1
0
        public RulesetDetails GetRulesetDetails(CardShop.Models.RuleSet rulesetWrapper)
        {
            RuleService ruleService = new RuleService();
            this.rulesetWrapper = rulesetWrapper;

            if (rulesetWrapper.RuleSet1 != null)
            {
                System.Workflow.Activities.Rules.RuleSet ruleset =
                    ruleService.DeserializeRules(rulesetWrapper.RuleSet1);
                ICollection<Rule> rules = ruleset.Rules;
                this.rulesDisplay = SetUpRulesDisplay(rules);
            }
            return this;
        }
Ejemplo n.º 2
0
        public void SetUp()
        {
            ruleService = new RuleService();
            rulesetWrapper = new CardShop.Models.RuleSet();
            rulesets = new List<CardShop.Models.RuleSet>();
            ruleset = new System.Workflow.Activities.Rules.RuleSet();
            ruleObject = new RuleObject();
            ruleObjects = new List<RuleObject>();
            rulesetDetails = new RulesetDetails();

            mockRuleService = new Mock<IRuleService>();
            mockContext = new Mock<IPracticeGDVPDao>();
            mockDbSet = new Mock<IDbSet<CardShop.Models.RuleSet>>();

            ruleService.dbContext = mockContext.Object;
        }