@Test public void testUnknownTransactionType() throws Exception { final Map<String, String> nvp = new HashMap<String, String>(); nvp.put("txn_type", "unknown"); parser = new IPNMessageParser(nvp, true); final IPNMessage message = parser.parse(); assertThat(message.getTransactionType(), nullValue()); }
public IPNMessage parse() { IPNMessage.Builder builder = new IPNMessage.Builder(nvp); if(validated) builder.validated(); for(Map.Entry<String, String> param : nvp.entrySet()) { addVariable(builder, param); } return builder.build(); }
IPNMessageParser { public IPNMessage parse() { IPNMessage.Builder builder = new IPNMessage.Builder(nvp); if(validated) builder.validated(); for(Map.Entry<String, String> param : nvp.entrySet()) { addVariable(builder, param); } return builder.build(); } }
IPNMessageParser { public IPNMessage parse() { IPNMessage.Builder builder = new IPNMessage.Builder(nvp); if(validated) builder.validated(); for(Map.Entry<String, String> param : nvp.entrySet()) { addVariable(builder, param); } return builder.build(); } IPNMessageParser(Map<String, String> nvp, boolean validated); }
IPNMessageParser { public IPNMessage parse() { IPNMessage.Builder builder = new IPNMessage.Builder(nvp); if(validated) builder.validated(); for(Map.Entry<String, String> param : nvp.entrySet()) { addVariable(builder, param); } return builder.build(); } IPNMessageParser(Map<String, String> nvp, boolean validated); IPNMessage parse(); }
IPNMessageParser { public IPNMessage parse() { IPNMessage.Builder builder = new IPNMessage.Builder(nvp); if(validated) builder.validated(); for(Map.Entry<String, String> param : nvp.entrySet()) { addVariable(builder, param); } return builder.build(); } IPNMessageParser(Map<String, String> nvp, boolean validated); IPNMessage parse();  }