@Test public void testToDto() { CommandDoc commandDoc = new CommandDocMapper().toDto(qavCommand1); CommandDoc expected = new CommandDoc(); expected.setName("cmd1"); expected.setDescription("desc1"); expected.setResult("result1"); assertThat(commandDoc, notNullValue()); assertThat(commandDoc, is(expected)); }
public CommandDoc toDto(QavCommand qavCommand) { CommandDoc result = new CommandDoc(); result.setName(qavCommand.name()); result.setDescription(qavCommand.description()); result.setResult(qavCommand.result()); result.setParameters(getParameterDocs(qavCommand.parameters())); return result; }
CommandDocMapper { public CommandDoc toDto(QavCommand qavCommand) { CommandDoc result = new CommandDoc(); result.setName(qavCommand.name()); result.setDescription(qavCommand.description()); result.setResult(qavCommand.result()); result.setParameters(getParameterDocs(qavCommand.parameters())); return result; } }
CommandDocMapper { public CommandDoc toDto(QavCommand qavCommand) { CommandDoc result = new CommandDoc(); result.setName(qavCommand.name()); result.setDescription(qavCommand.description()); result.setResult(qavCommand.result()); result.setParameters(getParameterDocs(qavCommand.parameters())); return result; }  }
CommandDocMapper { public CommandDoc toDto(QavCommand qavCommand) { CommandDoc result = new CommandDoc(); result.setName(qavCommand.name()); result.setDescription(qavCommand.description()); result.setResult(qavCommand.result()); result.setParameters(getParameterDocs(qavCommand.parameters())); return result; }  CommandDoc toDto(QavCommand qavCommand); }
CommandDocMapper { public CommandDoc toDto(QavCommand qavCommand) { CommandDoc result = new CommandDoc(); result.setName(qavCommand.name()); result.setDescription(qavCommand.description()); result.setResult(qavCommand.result()); result.setParameters(getParameterDocs(qavCommand.parameters())); return result; }  CommandDoc toDto(QavCommand qavCommand);  }