Example #1
0
 public void Should_throw_for_abstract_behavior()
 {
     Assert.Throws <ArgumentException>(() => BehaviorTypeChecker.ThrowIfInvalid(typeof(AbstractBehavior), Description));
 }
Example #2
0
 public void Should_throw_for_behavior_using_IBehaviorContext()
 {
     Assert.Throws <ArgumentException>(() => BehaviorTypeChecker.ThrowIfInvalid(typeof(BehaviorUsingBehaviorContext), Description));
 }
Example #3
0
 public void Should_throw_for_open_generic_behavior()
 {
     Assert.Throws <ArgumentException>(() => BehaviorTypeChecker.ThrowIfInvalid(typeof(GenericBehavior <>), Description));
 }
Example #4
0
 public void Should_not_throw_for_closed_generic_behavior()
 {
     BehaviorTypeChecker.ThrowIfInvalid(typeof(GenericBehavior <object>), Description);
 }
Example #5
0
 public void Should_not_throw_for_behavior_using_context_interfaces()
 {
     BehaviorTypeChecker.ThrowIfInvalid(typeof(BehaviorUsingContextInterface), Description);
 }
Example #6
0
 public void Should_not_throw_for_simple_behavior()
 {
     BehaviorTypeChecker.ThrowIfInvalid(typeof(ValidBehavior), Description);
 }
Example #7
0
 public void Should_throw_for_non_behavior()
 {
     Assert.Throws <ArgumentException>(() => BehaviorTypeChecker.ThrowIfInvalid(typeof(string), "foo"));
 }