public async Task UserIsAllowedTestAsync(long userId, bool allowed) { var isAllowed = await userFilter.CheckAsync(NewContext(userId)); Assert.Equal(allowed, isAllowed); }