public async Async.Task AgentAuthorization_IsAccepted() { var auth = new TestEndpointAuthorization(RequestType.Agent, Logger, Context); var func = new AgentCommands(Logger, auth, Context); var result = await func.Run(TestHttpRequestData.Empty("GET")); Assert.Equal(HttpStatusCode.BadRequest, result.StatusCode); // BadRequest due to no body, not Unauthorized }
public async Async.Task UserAuthorization_IsNotPermitted() { var auth = new TestEndpointAuthorization(RequestType.User, Logger, Context); var func = new AgentCommands(Logger, auth, Context); var result = await func.Run(TestHttpRequestData.Empty("GET")); Assert.Equal(HttpStatusCode.Unauthorized, result.StatusCode); }