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; }
public IConsentFacade IsUsable(IObjectFacade objectFacade) { return(new ConsentFacade(action.IsUsable(((ObjectFacade)objectFacade).WrappedNakedObject))); }
public IConsentSurface IsUsable(INakedObjectSurface nakedObject) { return(new ConsentWrapper(action.IsUsable(((NakedObjectWrapper)nakedObject).WrappedNakedObject))); }