public void denying_restriction_indicates_which_restriction_denied_the_entity() { var theCase = new Case(); theCase.Title = "The Title"; theCase.Condition = "Open"; theCase.Reason = "Fun"; var filter = new SingleEntityFilter<Case>(theCase); var conditionRestriction = new CasePropertyRestriction(x => x.Condition, "Open"); var titleRestriction = new CasePropertyRestriction(x => x.Title, "Not the Title"); var originRestriction = new CasePropertyRestriction(x => x.Reason, "Fun"); filter.ApplyRestriction(conditionRestriction); filter.ApplyRestriction(titleRestriction); filter.ApplyRestriction(originRestriction); filter.DenyingRestriction.ShouldBeTheSameAs(titleRestriction); }
public void denying_restriction_indicates_which_restriction_denied_the_entity() { var theCase = new Case(); theCase.Title = "The Title"; theCase.Condition = "Open"; theCase.Reason = "Fun"; var filter = new SingleEntityFilter <Case>(theCase); var conditionRestriction = new CasePropertyRestriction(x => x.Condition, "Open"); var titleRestriction = new CasePropertyRestriction(x => x.Title, "Not the Title"); var originRestriction = new CasePropertyRestriction(x => x.Reason, "Fun"); filter.ApplyRestriction(conditionRestriction); filter.ApplyRestriction(titleRestriction); filter.ApplyRestriction(originRestriction); filter.DenyingRestriction.ShouldBeTheSameAs(titleRestriction); }