Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring mvc 使用sessionfactory对象进行Junit测试_Spring Mvc_Junit_Mocking_Autowired - Fatal编程技术网

Spring mvc 使用sessionfactory对象进行Junit测试

Spring mvc 使用sessionfactory对象进行Junit测试,spring-mvc,junit,mocking,autowired,Spring Mvc,Junit,Mocking,Autowired,我有一个方法,它有一条直线 SessionService sessionService = sessionServiceFactory.getService(params.get(STORENAME_KEY)); 这一行基于storename读取xml文件并返回对象。 我想模拟这个sessionService对象。 我怎么做

我有一个方法,它有一条直线

SessionService sessionService = sessionServiceFactory.getService(params.get(STORENAME_KEY));
这一行基于storename读取xml文件并返回对象。 我想模拟这个sessionService对象。 我怎么做