public void WhenStatusCodeIs_SomethingElseEg502_Returns_Unknown() { var exception = new CodeOnlyD2LWebExceptionMock( HttpStatusCode.BadGateway); var interpretation = m_userContext.InterpretResult( exception ); Assert.AreEqual( RequestResult.RESULT_UNKNOWN, interpretation ); }
public void WhenStatusCodeIs500_Returns_InternalServerError() { var exception = new CodeOnlyD2LWebExceptionMock( HttpStatusCode.InternalServerError ); var interpretation = m_userContext.InterpretResult( exception ); Assert.AreEqual( RequestResult.INTERNAL_SERVER_ERROR, interpretation ); }
public void WhenStatusCodeIs404_Returns_NotFound() { var exception = new CodeOnlyD2LWebExceptionMock( HttpStatusCode.NotFound ); var interpretation = m_userContext.InterpretResult( exception ); Assert.AreEqual( RequestResult.NOT_FOUND, interpretation ); }
public void WhenStatusCodeIs400_Returns_BadRequest() { var exception = new CodeOnlyD2LWebExceptionMock( HttpStatusCode.BadRequest ); var interpretation = m_userContext.InterpretResult( exception ); Assert.AreEqual( RequestResult.BAD_REQUEST, interpretation ); }
public void WhenStatusCodeIs_SomethingElseEg502_Returns_Unknown() { var exception = new CodeOnlyD2LWebExceptionMock(HttpStatusCode.BadGateway); var interpretation = m_userContext.InterpretResult(exception); Assert.AreEqual(RequestResult.RESULT_UNKNOWN, interpretation); }
public void WhenStatusCodeIs500_Returns_InternalServerError() { var exception = new CodeOnlyD2LWebExceptionMock(HttpStatusCode.InternalServerError); var interpretation = m_userContext.InterpretResult(exception); Assert.AreEqual(RequestResult.INTERNAL_SERVER_ERROR, interpretation); }
public void WhenStatusCodeIs404_Returns_NotFound() { var exception = new CodeOnlyD2LWebExceptionMock(HttpStatusCode.NotFound); var interpretation = m_userContext.InterpretResult(exception); Assert.AreEqual(RequestResult.NOT_FOUND, interpretation); }
public void WhenStatusCodeIs400_Returns_BadRequest() { var exception = new CodeOnlyD2LWebExceptionMock(HttpStatusCode.BadRequest); var interpretation = m_userContext.InterpretResult(exception); Assert.AreEqual(RequestResult.BAD_REQUEST, interpretation); }