我刚刚开始使用F#,并为我编写的一些功能编写了一些单元测试。为了简洁起见,我决定创建一些不同测试用例的列表,并在一个测试中运行它们,而不是为每个测试创建单独的测试方法(我在这里不关注这个设计决策,只是指出,否则我的问题就没有什么意义了)。// simple helper to cut down on repeated code cases |> List.map func
// isNumeric is the function under test, its functionality should b
我的问题是如何测试这个“delete”方法?我不能为消息对象添加ID,因为它是一个生成值。所以我也不能使用findbyID(Integer id)方法。任何帮助都将不胜感激,谢谢!@Test System.out.println("delete");
// message.setID(1) -> This is not allowed
message.setSubject("Subject");