public void PArrayDefaultBehavior_can_apply_default_behavior_to_return_default_value_against_one_type() { // Arrange PArray. ExcludeGeneric(). IncludeExistsOfTTArrayPredicateOfT <int>(). DefaultBehavior = IndirectionBehaviors.DefaultValue; // Act var get_now = PDateTime.NowGet().Body; var exists = PArray.ExistsOfTTArrayPredicateOfT <int>().Body; // Assert Assert.IsNull(get_now); Assert.IsFalse(exists(null, null)); }
public void PArrayDefaultBehavior_can_apply_default_behavior_to_throw_NotImplementedException_against_one_type() { // Arrange PArray. ExcludeGeneric(). IncludeExistsOfTTArrayPredicateOfT <int>(). DefaultBehavior = IndirectionBehaviors.NotImplemented; // Act var get_now = PDateTime.NowGet().Body; var exists = PArray.ExistsOfTTArrayPredicateOfT <int>().Body; // Assert Assert.IsNull(get_now); Assert.Throws <NotImplementedException>(() => exists(null, null)); }