ArgTypeMetaExtractor { public ArgTypeMetaExtractor initialize(String sourceCodeString) { return initialize(null, sourceCodeString); } ArgTypeMetaExtractor(Configuration config); ArgTypeMetaExtractor initialize(String sourceCodeString); ArgTypeMetaExtractor initialize(ClassMeta classMeta); ArgTypeMetaExtractor initialize(ClassMeta classMeta, String sourceCodeString); List<ArgTypeMeta> getExtractedMetaList(); List<String> getExtractedNameList(); void doExtract(String argsAreaString);  }
@Test public void initialize_A$String() throws Exception { Configuration config = new Configuration(); ArgTypeMetaExtractor target = new ArgTypeMetaExtractor(config); String sourceCodeString = "package hoge.foo; public class Sample { public Sample() {}\r\n public void doSomething(String str) { System.out.println(\"aaaa\") } }"; target.initialize(sourceCodeString); }
@Test public void initialize_A$ClassMeta$String() throws Exception { Configuration config = new Configuration(); ArgTypeMetaExtractor target = new ArgTypeMetaExtractor(config); String sourceCodeString = "package hoge.foo; public class Sample { public Sample() {}\r\n public void doSomething(String str) { System.out.println(\"aaaa\") } }"; ClassMeta classMeta = new ClassMetaExtractor(config).extract(sourceCodeString); target.initialize(classMeta, sourceCodeString); }
@Test public void initialize_A$ClassMeta() throws Exception { Configuration config = new Configuration(); ArgTypeMetaExtractor target = new ArgTypeMetaExtractor(config); ClassMeta classMeta = mock(ClassMeta.class); ArgTypeMetaExtractor actual = target.initialize(classMeta); ArgTypeMetaExtractor expected = target; assertEquals(expected, actual); }
@Test public void initialize_A$String_StringIsNull() throws Exception { ArgTypeMetaExtractor target = new ArgTypeMetaExtractor(config); String sourceCodeString = null; try { target.initialize(sourceCodeString); fail(); } catch (JUnitHelperCoreException e) { } }
@Test public void initialize_A$String_StringIsEmpty() throws Exception { ArgTypeMetaExtractor target = new ArgTypeMetaExtractor(config); String sourceCodeString = ""; ArgTypeMetaExtractor actual = target.initialize(sourceCodeString); assertThat(actual, notNullValue()); }
@Test public void initialize_A$ClassMeta$String_StringIsNull() throws Exception { ArgTypeMetaExtractor target = new ArgTypeMetaExtractor(config); ClassMeta classMeta = new ClassMetaExtractor(config).extract("public class Sample {}"); String sourceCodeString = null; ArgTypeMetaExtractor actual = target.initialize(classMeta, sourceCodeString); assertThat(actual, notNullValue()); }
@Test public void initialize_A$ClassMeta$String_StringIsEmpty() throws Exception { ArgTypeMetaExtractor target = new ArgTypeMetaExtractor(config); ClassMeta classMeta = new ClassMetaExtractor(config).extract("public class Sample {}"); String sourceCodeString = ""; ArgTypeMetaExtractor actual = target.initialize(classMeta, sourceCodeString); assertThat(actual, notNullValue()); }