コード例 #1
0
            public void ReturnsFalse_WhenTTriggerActionIsNotAssignableFromActionType()
            {
                var action  = new ActionNotForThisEffect();
                var subject = new GenericEffectThatDoesNothing <ActionForEffect>();

                Assert.False(subject.ShouldReactToAction(action));
            }
コード例 #2
0
            public void ReturnsTrue_WhenActionTypeIsDescendedFromTTriggerAction()
            {
                var action  = new ActionThatQualifiesViaInheritance();
                var subject = new GenericEffectThatDoesNothing <ActionForEffect>();

                Assert.True(subject.ShouldReactToAction(action));
            }
コード例 #3
0
            public void ReturnsTrue_WhenActionTypeImplementsTTriggerActionInterface()
            {
                var action  = new ActionThatQualifiesViaInterface();
                var subject = new GenericEffectThatDoesNothing <IInterfaceForEffect>();

                Assert.True(subject.ShouldReactToAction(action));
            }
コード例 #4
0
            public void ReturnsTrue_WhenTTriggerActionIsSameAsActionType()
            {
                var action  = new ActionForEffect();
                var subject = new GenericEffectThatDoesNothing <ActionForEffect>();

                Assert.True(subject.ShouldReactToAction(action));
            }