public Task <bool> GroupExists(Guid objectId) { if (ThrowSocketExceptionsFromGroupExistsBeforeSuccess > 0) { ThrowSocketExceptionsFromGroupExistsBeforeSuccess--; throw new SocketException(); } if (ThrowNonSocketExceptionFromGroupExists) { throw new MockException(); } return(Task.FromResult(GroupsToUsers.ContainsKey(objectId))); }
public Task <bool> GroupExists(Guid objectId) { return(Task.FromResult(GroupsToUsers.ContainsKey(objectId))); }