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 bool IsVisible(IObjectFacade objectFacade) { return(action.IsVisible(((ObjectFacade)objectFacade).WrappedNakedObject)); }
public bool IsVisible(INakedObjectSurface nakedObject) { return(action.IsVisible(((NakedObjectWrapper)nakedObject).WrappedNakedObject)); }