public void where_not_equal_should_handle_boxed_values() { var theCase = new Case(); theCase.IsSecret = true; var filter = new SingleEntityFilter <Case>(theCase); filter.WhereNotEqual(x => x.IsSecret, false); filter.CanView.ShouldBeTrue(); }
public void where_not_equal_will_deny_viewing_if_the_entitys_property_and_expected_value_is_null() { var theCase = new Case(); theCase.Title = null; var filter = new SingleEntityFilter <Case>(theCase); filter.WhereNotEqual(x => x.Title, null); filter.CanView.ShouldBeFalse(); }
public void where_not_equal_will_deny_viewing_if_the_entitys_property_is_a_specific_value() { var theCase = new Case(); theCase.Title = "The Title"; var filter = new SingleEntityFilter <Case>(theCase); filter.WhereNotEqual(x => x.Title, theCase.Title); filter.CanView.ShouldBeFalse(); }
public void where_not_equal_should_handle_entities() { var person = new Person().WithId(); var otherPerson = new Person().WithId(); var theCase = new Case().WithId(); theCase.Owner = otherPerson; var filter = new SingleEntityFilter <Case>(theCase); filter.WhereNotEqual(x => x.Owner, person); filter.CanView.ShouldBeTrue(); }
public void a_single_deny_among_many_filters_will_deny_the_entity() { var theCase = new Case(); theCase.Title = "The Title"; theCase.Condition = "Open"; theCase.Reason = "Fun"; var filter = new SingleEntityFilter<Case>(theCase); filter.WhereEqual(x => x.Condition, "Open"); filter.WhereNotEqual(x => x.Title, theCase.Title); filter.WhereEqual(x => x.Reason, "Fun"); filter.CanView.ShouldBeFalse(); }
public void a_single_deny_among_many_filters_will_deny_the_entity() { var theCase = new Case(); theCase.Title = "The Title"; theCase.Condition = "Open"; theCase.Reason = "Fun"; var filter = new SingleEntityFilter <Case>(theCase); filter.WhereEqual(x => x.Condition, "Open"); filter.WhereNotEqual(x => x.Title, theCase.Title); filter.WhereEqual(x => x.Reason, "Fun"); filter.CanView.ShouldBeFalse(); }
public void where_not_equal_will_deny_viewing_if_the_entitys_property_is_a_specific_value() { var theCase = new Case(); theCase.Title = "The Title"; var filter = new SingleEntityFilter<Case>(theCase); filter.WhereNotEqual(x => x.Title, theCase.Title); filter.CanView.ShouldBeFalse(); }
public void where_not_equal_will_deny_viewing_if_the_entitys_property_and_expected_value_is_null() { var theCase = new Case(); theCase.Title = null; var filter = new SingleEntityFilter<Case>(theCase); filter.WhereNotEqual(x => x.Title, null); filter.CanView.ShouldBeFalse(); }
public void where_not_equal_should_handle_entities() { var person = new Person().WithId(); var otherPerson = new Person().WithId(); var theCase = new Case().WithId(); theCase.Owner = otherPerson; var filter = new SingleEntityFilter<Case>(theCase); filter.WhereNotEqual(x => x.Owner, person); filter.CanView.ShouldBeTrue(); }
public void where_not_equal_should_handle_boxed_values() { var theCase = new Case(); theCase.IsSecret = true; var filter = new SingleEntityFilter<Case>(theCase); filter.WhereNotEqual(x => x.IsSecret, false); filter.CanView.ShouldBeTrue(); }