public void CharacterHandlerTest_NonSpecialCharacters() { //Act var actual = ClientGatewayJeopardy.CharacterHandler("Abc xyz 1 don't"); //Assert Assert.AreEqual("Abc xyz 1 don't", actual); }
public GatewayResponseBase GetGatewayResponse(AppName appName, int timeOutInMilliSeconds, string timeOutInMilliSecondsOptionLabel, string optionName) { var url = AppUrlHelper.GetUrl(appName); var gatewayResponse = new GatewayResponseBase(); if (!string.IsNullOrEmpty(url)) { var responseDto = GetRestResponse(url, timeOutInMilliSeconds, timeOutInMilliSecondsOptionLabel, optionName); if (!string.IsNullOrEmpty(responseDto.ErrorDetails)) { SetGatewayResponseFromErrorDetails(gatewayResponse, responseDto.ErrorDetails); } else { try { switch (appName) { case AppName.Jeopardy: gatewayResponse = ClientGatewayJeopardy.SetGatewayResponseFromRestResponse(responseDto.ResponseContent); break; case AppName.NumericTrivia: gatewayResponse = ClientGatewayNumericTrivia.SetGatewayResponseFromRestResponse(responseDto.ResponseContent); break; case AppName.TrumpQuotes: gatewayResponse = ClientGatewayTrumpQuotes.SetGatewayResponseFromRestResponse(responseDto.ResponseContent); break; } } catch (Exception ex) { HandleUnexpectedError(ex, responseDto); SetGatewayResponseFromErrorDetails(gatewayResponse, responseDto.ErrorDetails); } } } return(gatewayResponse); }