2011-09-15 109 views
0

我测试用的JUnit下面的方法写一个JUnit测试案例,但我在映射属性问题在春季方法

@RequestMapping("https://stackoverflow.com/a/{b}/c/{d}") 
public @ResponseBody String getTranslatedXliff(Model model, 
    @PathVariable String templateCode, @PathVariable String localeCode){ 

    // ... 
} 
+0

你需要更好地解释你想要做什么以及哪些不起作用。 –

+0

而不是再次提出同样的问题,用你的新解释来更新这个问题。 –

回答

1

卡住了叫它:

@Test 
public void test_whatever() { 
    controller.getTranslatedXliff(myModel, "my template code", "my locale code"); 
} 

有关于注释的方法参数没有什么魔力。