public ITestAction AssertIsDisabled()
 {
     ResetLastMessage();
     if (actionSpec.IsVisible(owningObject.NakedObject)) {
         IConsent canUse = actionSpec.IsUsable(owningObject.NakedObject);
         LastMessage = canUse.Reason;
         Assert.IsFalse(canUse.IsAllowed, "Action '" + Name + "' is usable: " + canUse.Reason);
     }
     return this;
 }
Пример #2
0
 public IConsentFacade IsUsable(IObjectFacade objectFacade)
 {
     return(new ConsentFacade(action.IsUsable(((ObjectFacade)objectFacade).WrappedNakedObject)));
 }
Пример #3
0
 public IConsentSurface IsUsable(INakedObjectSurface nakedObject)
 {
     return(new ConsentWrapper(action.IsUsable(((NakedObjectWrapper)nakedObject).WrappedNakedObject)));
 }