请问如何将如下的java代码用scala写?
PHP中文网
PHP中文网 2017-04-18 09:06:13
0
1
283

@RunWith(Parameterized.class)
public class MeetingHttpApiTest extends TestBase {

    @Test
    public void testMeetingHttpApi() {
        TedaCaseVo tedaCaseVo = tedaCaseService.getTedaCase(tedaCaseId);
        String url = tedaCaseVo.getParamJsonStr();
        TedaTool.record(tedaCaseVo, SwordHttp.get(url), tedaCaseService);
    }

    @Parameters
    public static Collection data() {
        return Arrays.asList(new Object[][]{{22L}, {23L}, {24L},{25L}, {26L}, {27L}});
    }

    public MeetingHttpApiTest(Long tedaCaseId) {
        this.tedaCaseId = tedaCaseId;
    }

    protected Long tedaCaseId = 1L;

}

其中,TestBase类:

@SpringApplicationConfiguration(classes = Application.class)
@WebAppConfiguration
public class TestBase {
    @Autowired
    protected TedaCaseService tedaCaseService;

    private TestContextManager testContextManager;

    @Before
    public void setUpContext() throws Exception {
        this.testContextManager = new TestContextManager(getClass());
        this.testContextManager.prepareTestInstance(this);
    }

}
PHP中文网
PHP中文网

认证高级PHP讲师

全部回覆(1)
迷茫

idea的scala插件能自動轉換Java至Scala

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!