Exemplo n.º 1
0
        public void tag_plan_is_not_memoized_by_profile_and_subject()
        {
            var subject1 = new FakeSubject {
                Name = "Jeremy", Level = 10
            };
            var subject2 = new FakeSubject {
                Name = "Jeremy", Level = 10
            };

            subject1.ShouldBe(subject2);

            theCategory.Always.Build(x => new HtmlTag("div"));
            theCategory.ForProfile("a").Always.Build(x => new HtmlTag("a"));
            theCategory.ForProfile("b").Always.Build(x => new HtmlTag("b"));



            theCategory.PlanFor(subject1).ShouldNotBeSameAs(theCategory.PlanFor(subject2));
            theCategory.PlanFor(subject1, "a").ShouldNotBeSameAs(theCategory.PlanFor(subject2, "a"));
            theCategory.PlanFor(subject1, "b").ShouldNotBeSameAs(theCategory.PlanFor(subject2, "b"));

            theCategory.PlanFor(subject1, "a").ShouldNotBeSameAs(theCategory.PlanFor(subject2, "b"));
            theCategory.PlanFor(subject1, "b").ShouldNotBeSameAs(theCategory.PlanFor(subject2, "a"));
        }