To check to see if the user has permission to run the given application. If not, AccessDeniedException is thrown.
Assert.CanRunApplication("WebEdit");
HasAccess will check if the given parameter is true, otherwise an AccessDeniedException will be thrown.
Assert.HasAccess(Context.User.IsAdministrator, "Only administrators can create new domains");