target stringlengths 20 113k | src_fm stringlengths 11 86.3k | src_fm_fc stringlengths 21 86.4k | src_fm_fc_co stringlengths 30 86.4k | src_fm_fc_ms stringlengths 42 86.8k | src_fm_fc_ms_ff stringlengths 43 86.8k |
|---|---|---|---|---|---|
@Test public void check_non_optional_deep_optional_data_type_of_deep_optional() throws Exception { assertTrue(Optionality.is_deep_optional_of(m_oodt, m_dt)); } | public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.inner_type(), in... | Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in... | Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in... | Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in... | Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in... |
@Test public void check_optional_deep_optional_data_type_of_non_optional() throws Exception { assertFalse(Optionality.is_deep_optional_of(m_dt, m_odt)); } | public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.inner_type(), in... | Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in... | Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in... | Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in... | Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in... |
@Test public void check_optional_deep_optional_data_type_of_optional() throws Exception { assertFalse(Optionality.is_deep_optional_of(m_odt, m_odt)); } | public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.inner_type(), in... | Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in... | Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in... | Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in... | Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in... |
@Test public void check_optional_deep_optional_data_type_of_deep_optional() throws Exception { assertTrue(Optionality.is_deep_optional_of(m_oodt, m_odt)); } | public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.inner_type(), in... | Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in... | Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in... | Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in... | Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in... |
@Test public void check_deep_optional_deep_optional_data_type_of_non_optional() throws Exception { assertFalse(Optionality.is_deep_optional_of(m_dt, m_oodt)); } | public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.inner_type(), in... | Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in... | Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in... | Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in... | Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in... |
@Test public void check_deep_optional_deep_optional_data_type_of_optional() throws Exception { assertFalse(Optionality.is_deep_optional_of(m_odt, m_oodt)); } | public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.inner_type(), in... | Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in... | Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in... | Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in... | Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in... |
@Test public void check_deep_optional_deep_optional_data_type_of_deep_optional() throws Exception { assertFalse(Optionality.is_deep_optional_of(m_oodt, m_oodt)); } | public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.inner_type(), in... | Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in... | Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in... | Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in... | Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in... |
@Test public void load() throws Exception { TemplateSetLoader loader = new FileTemplateSetLoader(tempPath.toFile()); TemplateSet templateSet = loader.load(); assertEquals(1, templateSet.getVariables().size()); assertEquals("name", templateSet.getVariables().get(0).getName()); } | @Override public TemplateSet load() throws IOException { Metadata metadata = loadMetadata(); Map<String, Template> templates = new HashMap<>(); for (String file : metadata.getTemplates()) { templates.put(file, loadTemplate(file)); } try { templates.put(FILE_MAPPING_TEMPLATE_FILENAME, loadTemplate(FILE_MAPPING_TEMPLATE_... | FileTemplateSetLoader extends TemplateSetLoader { @Override public TemplateSet load() throws IOException { Metadata metadata = loadMetadata(); Map<String, Template> templates = new HashMap<>(); for (String file : metadata.getTemplates()) { templates.put(file, loadTemplate(file)); } try { templates.put(FILE_MAPPING_TEMP... | FileTemplateSetLoader extends TemplateSetLoader { @Override public TemplateSet load() throws IOException { Metadata metadata = loadMetadata(); Map<String, Template> templates = new HashMap<>(); for (String file : metadata.getTemplates()) { templates.put(file, loadTemplate(file)); } try { templates.put(FILE_MAPPING_TEMP... | FileTemplateSetLoader extends TemplateSetLoader { @Override public TemplateSet load() throws IOException { Metadata metadata = loadMetadata(); Map<String, Template> templates = new HashMap<>(); for (String file : metadata.getTemplates()) { templates.put(file, loadTemplate(file)); } try { templates.put(FILE_MAPPING_TEMP... | FileTemplateSetLoader extends TemplateSetLoader { @Override public TemplateSet load() throws IOException { Metadata metadata = loadMetadata(); Map<String, Template> templates = new HashMap<>(); for (String file : metadata.getTemplates()) { templates.put(file, loadTemplate(file)); } try { templates.put(FILE_MAPPING_TEMP... |
@Test public void no_super_types_no_itself() throws Exception { TestDataType t1 = new TestDataType("x"); Set<DataType> r = AllSuperTypes.run(t1, false); assertEquals(0, r.size()); } | public static Set<DataType> run(DataType t, boolean itself) { Ensure.not_null(t); Set<DataType> pending = new HashSet<>(); pending.add(t); Set<DataType> result = new HashSet<>(); if (itself) { result.add(t); } while (pending.size() > 0) { DataType dt = pending.iterator().next(); pending.remove(dt); Set<DataType> pendin... | AllSuperTypes { public static Set<DataType> run(DataType t, boolean itself) { Ensure.not_null(t); Set<DataType> pending = new HashSet<>(); pending.add(t); Set<DataType> result = new HashSet<>(); if (itself) { result.add(t); } while (pending.size() > 0) { DataType dt = pending.iterator().next(); pending.remove(dt); Set<... | AllSuperTypes { public static Set<DataType> run(DataType t, boolean itself) { Ensure.not_null(t); Set<DataType> pending = new HashSet<>(); pending.add(t); Set<DataType> result = new HashSet<>(); if (itself) { result.add(t); } while (pending.size() > 0) { DataType dt = pending.iterator().next(); pending.remove(dt); Set<... | AllSuperTypes { public static Set<DataType> run(DataType t, boolean itself) { Ensure.not_null(t); Set<DataType> pending = new HashSet<>(); pending.add(t); Set<DataType> result = new HashSet<>(); if (itself) { result.add(t); } while (pending.size() > 0) { DataType dt = pending.iterator().next(); pending.remove(dt); Set<... | AllSuperTypes { public static Set<DataType> run(DataType t, boolean itself) { Ensure.not_null(t); Set<DataType> pending = new HashSet<>(); pending.add(t); Set<DataType> result = new HashSet<>(); if (itself) { result.add(t); } while (pending.size() > 0) { DataType dt = pending.iterator().next(); pending.remove(dt); Set<... |
@Test public void no_super_types_with_itself() throws Exception { TestDataType t1 = new TestDataType("x"); Set<DataType> r = AllSuperTypes.run(t1, true); assertEquals(1, r.size()); assertTrue(r.contains(t1)); } | public static Set<DataType> run(DataType t, boolean itself) { Ensure.not_null(t); Set<DataType> pending = new HashSet<>(); pending.add(t); Set<DataType> result = new HashSet<>(); if (itself) { result.add(t); } while (pending.size() > 0) { DataType dt = pending.iterator().next(); pending.remove(dt); Set<DataType> pendin... | AllSuperTypes { public static Set<DataType> run(DataType t, boolean itself) { Ensure.not_null(t); Set<DataType> pending = new HashSet<>(); pending.add(t); Set<DataType> result = new HashSet<>(); if (itself) { result.add(t); } while (pending.size() > 0) { DataType dt = pending.iterator().next(); pending.remove(dt); Set<... | AllSuperTypes { public static Set<DataType> run(DataType t, boolean itself) { Ensure.not_null(t); Set<DataType> pending = new HashSet<>(); pending.add(t); Set<DataType> result = new HashSet<>(); if (itself) { result.add(t); } while (pending.size() > 0) { DataType dt = pending.iterator().next(); pending.remove(dt); Set<... | AllSuperTypes { public static Set<DataType> run(DataType t, boolean itself) { Ensure.not_null(t); Set<DataType> pending = new HashSet<>(); pending.add(t); Set<DataType> result = new HashSet<>(); if (itself) { result.add(t); } while (pending.size() > 0) { DataType dt = pending.iterator().next(); pending.remove(dt); Set<... | AllSuperTypes { public static Set<DataType> run(DataType t, boolean itself) { Ensure.not_null(t); Set<DataType> pending = new HashSet<>(); pending.add(t); Set<DataType> result = new HashSet<>(); if (itself) { result.add(t); } while (pending.size() > 0) { DataType dt = pending.iterator().next(); pending.remove(dt); Set<... |
@Test public void one_super_type_no_itself() throws Exception { TestDataType t_x = new TestDataType("x"); TestDataType t_y = new TestDataType("y", t_x); Set<DataType> r = AllSuperTypes.run(t_y, false); assertEquals(1, r.size()); assertTrue(r.contains(t_x)); } | public static Set<DataType> run(DataType t, boolean itself) { Ensure.not_null(t); Set<DataType> pending = new HashSet<>(); pending.add(t); Set<DataType> result = new HashSet<>(); if (itself) { result.add(t); } while (pending.size() > 0) { DataType dt = pending.iterator().next(); pending.remove(dt); Set<DataType> pendin... | AllSuperTypes { public static Set<DataType> run(DataType t, boolean itself) { Ensure.not_null(t); Set<DataType> pending = new HashSet<>(); pending.add(t); Set<DataType> result = new HashSet<>(); if (itself) { result.add(t); } while (pending.size() > 0) { DataType dt = pending.iterator().next(); pending.remove(dt); Set<... | AllSuperTypes { public static Set<DataType> run(DataType t, boolean itself) { Ensure.not_null(t); Set<DataType> pending = new HashSet<>(); pending.add(t); Set<DataType> result = new HashSet<>(); if (itself) { result.add(t); } while (pending.size() > 0) { DataType dt = pending.iterator().next(); pending.remove(dt); Set<... | AllSuperTypes { public static Set<DataType> run(DataType t, boolean itself) { Ensure.not_null(t); Set<DataType> pending = new HashSet<>(); pending.add(t); Set<DataType> result = new HashSet<>(); if (itself) { result.add(t); } while (pending.size() > 0) { DataType dt = pending.iterator().next(); pending.remove(dt); Set<... | AllSuperTypes { public static Set<DataType> run(DataType t, boolean itself) { Ensure.not_null(t); Set<DataType> pending = new HashSet<>(); pending.add(t); Set<DataType> result = new HashSet<>(); if (itself) { result.add(t); } while (pending.size() > 0) { DataType dt = pending.iterator().next(); pending.remove(dt); Set<... |
@Test public void one_super_type_with_itself() throws Exception { TestDataType t_x = new TestDataType("x"); TestDataType t_y = new TestDataType("y", t_x); Set<DataType> r = AllSuperTypes.run(t_y, true); assertEquals(2, r.size()); assertTrue(r.contains(t_x)); assertTrue(r.contains(t_y)); } | public static Set<DataType> run(DataType t, boolean itself) { Ensure.not_null(t); Set<DataType> pending = new HashSet<>(); pending.add(t); Set<DataType> result = new HashSet<>(); if (itself) { result.add(t); } while (pending.size() > 0) { DataType dt = pending.iterator().next(); pending.remove(dt); Set<DataType> pendin... | AllSuperTypes { public static Set<DataType> run(DataType t, boolean itself) { Ensure.not_null(t); Set<DataType> pending = new HashSet<>(); pending.add(t); Set<DataType> result = new HashSet<>(); if (itself) { result.add(t); } while (pending.size() > 0) { DataType dt = pending.iterator().next(); pending.remove(dt); Set<... | AllSuperTypes { public static Set<DataType> run(DataType t, boolean itself) { Ensure.not_null(t); Set<DataType> pending = new HashSet<>(); pending.add(t); Set<DataType> result = new HashSet<>(); if (itself) { result.add(t); } while (pending.size() > 0) { DataType dt = pending.iterator().next(); pending.remove(dt); Set<... | AllSuperTypes { public static Set<DataType> run(DataType t, boolean itself) { Ensure.not_null(t); Set<DataType> pending = new HashSet<>(); pending.add(t); Set<DataType> result = new HashSet<>(); if (itself) { result.add(t); } while (pending.size() > 0) { DataType dt = pending.iterator().next(); pending.remove(dt); Set<... | AllSuperTypes { public static Set<DataType> run(DataType t, boolean itself) { Ensure.not_null(t); Set<DataType> pending = new HashSet<>(); pending.add(t); Set<DataType> result = new HashSet<>(); if (itself) { result.add(t); } while (pending.size() > 0) { DataType dt = pending.iterator().next(); pending.remove(dt); Set<... |
@Test public void multiple_super_types_no_itself() throws Exception { TestDataType t_x = new TestDataType("x"); TestDataType t_y = new TestDataType("y", t_x); TestDataType t_z = new TestDataType("z", t_x, t_y); TestDataType t_w = new TestDataType("w"); TestDataType t_v = new TestDataType("v", t_z, t_w); Set<DataType> r... | public static Set<DataType> run(DataType t, boolean itself) { Ensure.not_null(t); Set<DataType> pending = new HashSet<>(); pending.add(t); Set<DataType> result = new HashSet<>(); if (itself) { result.add(t); } while (pending.size() > 0) { DataType dt = pending.iterator().next(); pending.remove(dt); Set<DataType> pendin... | AllSuperTypes { public static Set<DataType> run(DataType t, boolean itself) { Ensure.not_null(t); Set<DataType> pending = new HashSet<>(); pending.add(t); Set<DataType> result = new HashSet<>(); if (itself) { result.add(t); } while (pending.size() > 0) { DataType dt = pending.iterator().next(); pending.remove(dt); Set<... | AllSuperTypes { public static Set<DataType> run(DataType t, boolean itself) { Ensure.not_null(t); Set<DataType> pending = new HashSet<>(); pending.add(t); Set<DataType> result = new HashSet<>(); if (itself) { result.add(t); } while (pending.size() > 0) { DataType dt = pending.iterator().next(); pending.remove(dt); Set<... | AllSuperTypes { public static Set<DataType> run(DataType t, boolean itself) { Ensure.not_null(t); Set<DataType> pending = new HashSet<>(); pending.add(t); Set<DataType> result = new HashSet<>(); if (itself) { result.add(t); } while (pending.size() > 0) { DataType dt = pending.iterator().next(); pending.remove(dt); Set<... | AllSuperTypes { public static Set<DataType> run(DataType t, boolean itself) { Ensure.not_null(t); Set<DataType> pending = new HashSet<>(); pending.add(t); Set<DataType> result = new HashSet<>(); if (itself) { result.add(t); } while (pending.size() > 0) { DataType dt = pending.iterator().next(); pending.remove(dt); Set<... |
@Test public void multiple_super_types_with_itself() throws Exception { TestDataType t_x = new TestDataType("x"); TestDataType t_y = new TestDataType("y", t_x); TestDataType t_z = new TestDataType("z", t_x, t_y); TestDataType t_w = new TestDataType("w"); TestDataType t_v = new TestDataType("v", t_z, t_w); Set<DataType>... | public static Set<DataType> run(DataType t, boolean itself) { Ensure.not_null(t); Set<DataType> pending = new HashSet<>(); pending.add(t); Set<DataType> result = new HashSet<>(); if (itself) { result.add(t); } while (pending.size() > 0) { DataType dt = pending.iterator().next(); pending.remove(dt); Set<DataType> pendin... | AllSuperTypes { public static Set<DataType> run(DataType t, boolean itself) { Ensure.not_null(t); Set<DataType> pending = new HashSet<>(); pending.add(t); Set<DataType> result = new HashSet<>(); if (itself) { result.add(t); } while (pending.size() > 0) { DataType dt = pending.iterator().next(); pending.remove(dt); Set<... | AllSuperTypes { public static Set<DataType> run(DataType t, boolean itself) { Ensure.not_null(t); Set<DataType> pending = new HashSet<>(); pending.add(t); Set<DataType> result = new HashSet<>(); if (itself) { result.add(t); } while (pending.size() > 0) { DataType dt = pending.iterator().next(); pending.remove(dt); Set<... | AllSuperTypes { public static Set<DataType> run(DataType t, boolean itself) { Ensure.not_null(t); Set<DataType> pending = new HashSet<>(); pending.add(t); Set<DataType> result = new HashSet<>(); if (itself) { result.add(t); } while (pending.size() > 0) { DataType dt = pending.iterator().next(); pending.remove(dt); Set<... | AllSuperTypes { public static Set<DataType> run(DataType t, boolean itself) { Ensure.not_null(t); Set<DataType> pending = new HashSet<>(); pending.add(t); Set<DataType> result = new HashSet<>(); if (itself) { result.add(t); } while (pending.size() > 0) { DataType dt = pending.iterator().next(); pending.remove(dt); Set<... |
@Test public void same_type_not_included() throws Exception { TestDataType x = new TestDataType("x"); m_dts.add(x); Set<DataType> r = CommonLowerSuperTypes.run(x, x, false); assertEquals(0, r.size()); } | public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); common.retainAll(super_2); ... | CommonLowerSuperTypes { public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); com... | CommonLowerSuperTypes { public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); com... | CommonLowerSuperTypes { public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); com... | CommonLowerSuperTypes { public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); com... |
@Test public void same_type_with_included() throws Exception { TestDataType x = new TestDataType("x"); m_dts.add(x); Set<DataType> r = CommonLowerSuperTypes.run(x, x, true); assertEquals(1, r.size()); assertTrue(r.contains(x)); } | public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); common.retainAll(super_2); ... | CommonLowerSuperTypes { public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); com... | CommonLowerSuperTypes { public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); com... | CommonLowerSuperTypes { public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); com... | CommonLowerSuperTypes { public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); com... |
@Test public void super_and_sub_type_not_included() throws Exception { TestDataType x = new TestDataType("x"); TestDataType y = new TestDataType("y", x); m_dts.add(x); m_dts.add(y); Set<DataType> r = CommonLowerSuperTypes.run(x, y, false); assertEquals(0, r.size()); } | public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); common.retainAll(super_2); ... | CommonLowerSuperTypes { public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); com... | CommonLowerSuperTypes { public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); com... | CommonLowerSuperTypes { public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); com... | CommonLowerSuperTypes { public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); com... |
@Test public void super_and_sub_type_with_included() throws Exception { TestDataType x = new TestDataType("x"); TestDataType y = new TestDataType("y", x); m_dts.add(x); m_dts.add(y); Set<DataType> r = CommonLowerSuperTypes.run(x, y, true); assertEquals(1, r.size()); assertTrue(r.contains(x)); } | public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); common.retainAll(super_2); ... | CommonLowerSuperTypes { public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); com... | CommonLowerSuperTypes { public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); com... | CommonLowerSuperTypes { public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); com... | CommonLowerSuperTypes { public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); com... |
@Test public void testStartup() throws Exception { assertEquals(instance.isAttached(), true); } | public void startup(String filename) throws Exception { sysConfig = new SystemConfiguration(filename); try { startBackground(); } catch (Exception e) { throw e; } registerWidgets(); } | ApplicationCore { public void startup(String filename) throws Exception { sysConfig = new SystemConfiguration(filename); try { startBackground(); } catch (Exception e) { throw e; } registerWidgets(); } } | ApplicationCore { public void startup(String filename) throws Exception { sysConfig = new SystemConfiguration(filename); try { startBackground(); } catch (Exception e) { throw e; } registerWidgets(); } protected ApplicationCore(); } | ApplicationCore { public void startup(String filename) throws Exception { sysConfig = new SystemConfiguration(filename); try { startBackground(); } catch (Exception e) { throw e; } registerWidgets(); } protected ApplicationCore(); static ApplicationCore getInstance(); void startup(String filename); void attach(); void... | ApplicationCore { public void startup(String filename) throws Exception { sysConfig = new SystemConfiguration(filename); try { startBackground(); } catch (Exception e) { throw e; } registerWidgets(); } protected ApplicationCore(); static ApplicationCore getInstance(); void startup(String filename); void attach(); void... |
@Test public void two_types_with_common_super_type() throws Exception { TestDataType x = new TestDataType("x"); TestDataType y = new TestDataType("y", x); TestDataType z = new TestDataType("z", x); m_dts.add(x); m_dts.add(y); m_dts.add(z); Set<DataType> r = CommonLowerSuperTypes.run(y, z, true); assertEquals(1, r.size(... | public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); common.retainAll(super_2); ... | CommonLowerSuperTypes { public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); com... | CommonLowerSuperTypes { public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); com... | CommonLowerSuperTypes { public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); com... | CommonLowerSuperTypes { public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); com... |
@Test public void two_types_with_two_common_super_type() throws Exception { TestDataType x = new TestDataType("x"); TestDataType y = new TestDataType("y"); TestDataType z = new TestDataType("z", x, y); TestDataType w = new TestDataType("w", x, y); m_dts.add(x); m_dts.add(y); m_dts.add(z); m_dts.add(w); Set<DataType> r ... | public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); common.retainAll(super_2); ... | CommonLowerSuperTypes { public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); com... | CommonLowerSuperTypes { public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); com... | CommonLowerSuperTypes { public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); com... | CommonLowerSuperTypes { public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); com... |
@Test public void two_types_with_two_common_related_super_types() throws Exception { TestDataType x = new TestDataType("x"); TestDataType y = new TestDataType("y", x); TestDataType z = new TestDataType("z", x, y); TestDataType w = new TestDataType("w", x, y); m_dts.add(x); m_dts.add(y); m_dts.add(z); m_dts.add(w); Set<... | public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); common.retainAll(super_2); ... | CommonLowerSuperTypes { public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); com... | CommonLowerSuperTypes { public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); com... | CommonLowerSuperTypes { public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); com... | CommonLowerSuperTypes { public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>(super_1); com... |
@Test public void create_find_types() throws Exception { TypeScope ts = new TypeScope(); PrimitiveScope ps = new PrimitiveScope(); ts.add(new NamedType("a", ps.int16())); ts.add(new NamedType("d", ps.int32())); assertEquals(ps.int16(), ts.type("a")); assertEquals(ps.int32(), ts.type("d")); assertNull(ts.type("e")); } | public DataType type(String name) throws AmbiguousNameException { NamedType nt = find(name); if (nt == null) { return null; } return nt.type(); } | TypeScope extends Scope<NamedType> { public DataType type(String name) throws AmbiguousNameException { NamedType nt = find(name); if (nt == null) { return null; } return nt.type(); } } | TypeScope extends Scope<NamedType> { public DataType type(String name) throws AmbiguousNameException { NamedType nt = find(name); if (nt == null) { return null; } return nt.type(); } TypeScope(); } | TypeScope extends Scope<NamedType> { public DataType type(String name) throws AmbiguousNameException { NamedType nt = find(name); if (nt == null) { return null; } return nt.type(); } TypeScope(); DataType type(String name); } | TypeScope extends Scope<NamedType> { public DataType type(String name) throws AmbiguousNameException { NamedType nt = find(name); if (nt == null) { return null; } return nt.type(); } TypeScope(); DataType type(String name); } |
@Test public void create_assign_obtain_values() throws Exception { m_vs.add(new NamedValue("a", m_ps.ascii().make("bar"))); DataValue vl = m_vs.value("a"); assertTrue(vl instanceof AsciiValue); AsciiValue sv = (AsciiValue) vl; assertEquals("bar", sv.value()); } | public DataValue value(String name) throws AmbiguousNameException { Ensure.not_null(name, "name == null"); NamedValue nv = find(name); if (nv == null) { return null; } return nv.value(); } | ValueScope extends Scope<NamedValue> { public DataValue value(String name) throws AmbiguousNameException { Ensure.not_null(name, "name == null"); NamedValue nv = find(name); if (nv == null) { return null; } return nv.value(); } } | ValueScope extends Scope<NamedValue> { public DataValue value(String name) throws AmbiguousNameException { Ensure.not_null(name, "name == null"); NamedValue nv = find(name); if (nv == null) { return null; } return nv.value(); } ValueScope(TypeScope types); } | ValueScope extends Scope<NamedValue> { public DataValue value(String name) throws AmbiguousNameException { Ensure.not_null(name, "name == null"); NamedValue nv = find(name); if (nv == null) { return null; } return nv.value(); } ValueScope(TypeScope types); TypeScope typed_scope(); DataType type(String name); DataValue ... | ValueScope extends Scope<NamedValue> { public DataValue value(String name) throws AmbiguousNameException { Ensure.not_null(name, "name == null"); NamedValue nv = find(name); if (nv == null) { return null; } return nv.value(); } ValueScope(TypeScope types); TypeScope typed_scope(); DataType type(String name); DataValue ... |
@Test public void obtain_typed_scope() throws Exception { assertEquals(m_ts, m_vs.typed_scope()); } | public TypeScope typed_scope() { return m_types; } | ValueScope extends Scope<NamedValue> { public TypeScope typed_scope() { return m_types; } } | ValueScope extends Scope<NamedValue> { public TypeScope typed_scope() { return m_types; } ValueScope(TypeScope types); } | ValueScope extends Scope<NamedValue> { public TypeScope typed_scope() { return m_types; } ValueScope(TypeScope types); TypeScope typed_scope(); DataType type(String name); DataValue value(String name); } | ValueScope extends Scope<NamedValue> { public TypeScope typed_scope() { return m_types; } ValueScope(TypeScope types); TypeScope typed_scope(); DataType type(String name); DataValue value(String name); } |
@Test public void obtain_non_existing_value() throws Exception { assertNull(m_vs.value("h")); } | public DataValue value(String name) throws AmbiguousNameException { Ensure.not_null(name, "name == null"); NamedValue nv = find(name); if (nv == null) { return null; } return nv.value(); } | ValueScope extends Scope<NamedValue> { public DataValue value(String name) throws AmbiguousNameException { Ensure.not_null(name, "name == null"); NamedValue nv = find(name); if (nv == null) { return null; } return nv.value(); } } | ValueScope extends Scope<NamedValue> { public DataValue value(String name) throws AmbiguousNameException { Ensure.not_null(name, "name == null"); NamedValue nv = find(name); if (nv == null) { return null; } return nv.value(); } ValueScope(TypeScope types); } | ValueScope extends Scope<NamedValue> { public DataValue value(String name) throws AmbiguousNameException { Ensure.not_null(name, "name == null"); NamedValue nv = find(name); if (nv == null) { return null; } return nv.value(); } ValueScope(TypeScope types); TypeScope typed_scope(); DataType type(String name); DataValue ... | ValueScope extends Scope<NamedValue> { public DataValue value(String name) throws AmbiguousNameException { Ensure.not_null(name, "name == null"); NamedValue nv = find(name); if (nv == null) { return null; } return nv.value(); } ValueScope(TypeScope types); TypeScope typed_scope(); DataType type(String name); DataValue ... |
@Test public void create_list_type_check_properties() throws Exception { assertEquals("list<b>", m_list_type.name()); assertTrue(m_list_type.sub_of(m_scope.any())); assertFalse(m_list_type.is_abstract()); assertEquals(m_type, m_list_type.inner_type()); } | @Override public boolean is_abstract() { return false; } | ListDataType extends CollectionDataType { @Override public boolean is_abstract() { return false; } } | ListDataType extends CollectionDataType { @Override public boolean is_abstract() { return false; } ListDataType(DataType inner_type, AnyType any); } | ListDataType extends CollectionDataType { @Override public boolean is_abstract() { return false; } ListDataType(DataType inner_type, AnyType any); static final String build_list_name(DataType inner); static ListDataType list_of(DataType inner, PrimitiveScope pscope); @Override ListDataValue make(); @Override boolean is... | ListDataType extends CollectionDataType { @Override public boolean is_abstract() { return false; } ListDataType(DataType inner_type, AnyType any); static final String build_list_name(DataType inner); static ListDataType list_of(DataType inner, PrimitiveScope pscope); @Override ListDataValue make(); @Override boolean is... |
@Test public void add_wrong_types() throws Exception { try { m_list.add(m_scope.bool().make(true)); fail(); } catch (IllegalArgumentException e) { } try { m_list.add(m_vsuper); fail(); } catch (IllegalArgumentException e) { } } | @Override public ListDataValue make() { return new ListDataValue(this); } | ListDataType extends CollectionDataType { @Override public ListDataValue make() { return new ListDataValue(this); } } | ListDataType extends CollectionDataType { @Override public ListDataValue make() { return new ListDataValue(this); } ListDataType(DataType inner_type, AnyType any); } | ListDataType extends CollectionDataType { @Override public ListDataValue make() { return new ListDataValue(this); } ListDataType(DataType inner_type, AnyType any); static final String build_list_name(DataType inner); static ListDataType list_of(DataType inner, PrimitiveScope pscope); @Override ListDataValue make(); @Ov... | ListDataType extends CollectionDataType { @Override public ListDataValue make() { return new ListDataValue(this); } ListDataType(DataType inner_type, AnyType any); static final String build_list_name(DataType inner); static ListDataType list_of(DataType inner, PrimitiveScope pscope); @Override ListDataValue make(); @Ov... |
@Test public void add_remove_check_invalid_parameters() throws Exception { try { m_list.add(null); fail(); } catch (IllegalArgumentException e) { } try { m_list.add(m_scope.bool().make(true)); fail(); } catch (IllegalArgumentException e) { } try { m_list.remove(-1); fail(); } catch (IllegalArgumentException e) { } try ... | @Override public ListDataValue make() { return new ListDataValue(this); } | ListDataType extends CollectionDataType { @Override public ListDataValue make() { return new ListDataValue(this); } } | ListDataType extends CollectionDataType { @Override public ListDataValue make() { return new ListDataValue(this); } ListDataType(DataType inner_type, AnyType any); } | ListDataType extends CollectionDataType { @Override public ListDataValue make() { return new ListDataValue(this); } ListDataType(DataType inner_type, AnyType any); static final String build_list_name(DataType inner); static ListDataType list_of(DataType inner, PrimitiveScope pscope); @Override ListDataValue make(); @Ov... | ListDataType extends CollectionDataType { @Override public ListDataValue make() { return new ListDataValue(this); } ListDataType(DataType inner_type, AnyType any); static final String build_list_name(DataType inner); static ListDataType list_of(DataType inner, PrimitiveScope pscope); @Override ListDataValue make(); @Ov... |
@Test public void testAttach() { instance.attach(); assertEquals(instance.isAttached(), true); } | public void attach() { if (!attached) { try { runtimeAgg.start(); attached = true; if (CREATE_MOCK_RAINBOW) { mockRainbow.run(); } } catch (RuntimeAggregatorException ex) { Logger.getLogger(ApplicationCore.class.getName()).log(Level.SEVERE, "Cannot attach to the Rainbow system.", ex); } } } | ApplicationCore { public void attach() { if (!attached) { try { runtimeAgg.start(); attached = true; if (CREATE_MOCK_RAINBOW) { mockRainbow.run(); } } catch (RuntimeAggregatorException ex) { Logger.getLogger(ApplicationCore.class.getName()).log(Level.SEVERE, "Cannot attach to the Rainbow system.", ex); } } } } | ApplicationCore { public void attach() { if (!attached) { try { runtimeAgg.start(); attached = true; if (CREATE_MOCK_RAINBOW) { mockRainbow.run(); } } catch (RuntimeAggregatorException ex) { Logger.getLogger(ApplicationCore.class.getName()).log(Level.SEVERE, "Cannot attach to the Rainbow system.", ex); } } } protected ... | ApplicationCore { public void attach() { if (!attached) { try { runtimeAgg.start(); attached = true; if (CREATE_MOCK_RAINBOW) { mockRainbow.run(); } } catch (RuntimeAggregatorException ex) { Logger.getLogger(ApplicationCore.class.getName()).log(Level.SEVERE, "Cannot attach to the Rainbow system.", ex); } } } protected ... | ApplicationCore { public void attach() { if (!attached) { try { runtimeAgg.start(); attached = true; if (CREATE_MOCK_RAINBOW) { mockRainbow.run(); } } catch (RuntimeAggregatorException ex) { Logger.getLogger(ApplicationCore.class.getName()).log(Level.SEVERE, "Cannot attach to the Rainbow system.", ex); } } } protected ... |
@Test public void list_comparison() throws Exception { ListDataValue v = m_list_type.make(); assertTrue(v.equals(m_list)); assertTrue(v.hashCode() == m_list.hashCode()); ListDataValue sup_v = new ListDataType(m_super_type, m_scope.any()).make(); assertFalse(sup_v.equals(m_list)); assertTrue(m_list.add(m_v1)); assertFal... | @Override public ListDataValue make() { return new ListDataValue(this); } | ListDataType extends CollectionDataType { @Override public ListDataValue make() { return new ListDataValue(this); } } | ListDataType extends CollectionDataType { @Override public ListDataValue make() { return new ListDataValue(this); } ListDataType(DataType inner_type, AnyType any); } | ListDataType extends CollectionDataType { @Override public ListDataValue make() { return new ListDataValue(this); } ListDataType(DataType inner_type, AnyType any); static final String build_list_name(DataType inner); static ListDataType list_of(DataType inner, PrimitiveScope pscope); @Override ListDataValue make(); @Ov... | ListDataType extends CollectionDataType { @Override public ListDataValue make() { return new ListDataValue(this); } ListDataType(DataType inner_type, AnyType any); static final String build_list_name(DataType inner); static ListDataType list_of(DataType inner, PrimitiveScope pscope); @Override ListDataValue make(); @Ov... |
@Test public void obtaining_existing_data_type() throws Exception { ListDataType t = ListDataType.list_of(m_type, m_scope); assertSame(m_list_type, t); } | public static ListDataType list_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_list_name(inner)); } catch (AmbiguousNameException e) { } i... | ListDataType extends CollectionDataType { public static ListDataType list_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_list_name(inner))... | ListDataType extends CollectionDataType { public static ListDataType list_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_list_name(inner))... | ListDataType extends CollectionDataType { public static ListDataType list_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_list_name(inner))... | ListDataType extends CollectionDataType { public static ListDataType list_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_list_name(inner))... |
@Test public void obtaining_new_data_type() throws Exception { ListDataType t1 = ListDataType.list_of(m_scope.int8(), m_scope); assertSame(t1, ListDataType.list_of(m_scope.int8(), m_scope)); } | public static ListDataType list_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_list_name(inner)); } catch (AmbiguousNameException e) { } i... | ListDataType extends CollectionDataType { public static ListDataType list_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_list_name(inner))... | ListDataType extends CollectionDataType { public static ListDataType list_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_list_name(inner))... | ListDataType extends CollectionDataType { public static ListDataType list_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_list_name(inner))... | ListDataType extends CollectionDataType { public static ListDataType list_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_list_name(inner))... |
@Test public void create_bag_type_check_properties() throws Exception { assertEquals("bag<b>", m_bag_type.name()); assertTrue(m_bag_type.sub_of(m_scope.any())); assertFalse(m_bag_type.is_abstract()); assertEquals(m_type, m_bag_type.inner_type()); } | @Override public boolean is_abstract() { return false; } | BagDataType extends CollectionDataType { @Override public boolean is_abstract() { return false; } } | BagDataType extends CollectionDataType { @Override public boolean is_abstract() { return false; } BagDataType(DataType inner_type, AnyType any); } | BagDataType extends CollectionDataType { @Override public boolean is_abstract() { return false; } BagDataType(DataType inner_type, AnyType any); static final String build_bag_name(DataType inner); static BagDataType bag_of(DataType inner, PrimitiveScope pscope); @Override BagDataValue make(); @Override boolean is_abstr... | BagDataType extends CollectionDataType { @Override public boolean is_abstract() { return false; } BagDataType(DataType inner_type, AnyType any); static final String build_bag_name(DataType inner); static BagDataType bag_of(DataType inner, PrimitiveScope pscope); @Override BagDataValue make(); @Override boolean is_abstr... |
@Test(expected = IllegalArgumentException.class) public void add_wrong_types() throws Exception { assertTrue(m_bag.add(m_scope.bool().make(true))); } | @Override public BagDataValue make() { return new BagDataValue(this); } | BagDataType extends CollectionDataType { @Override public BagDataValue make() { return new BagDataValue(this); } } | BagDataType extends CollectionDataType { @Override public BagDataValue make() { return new BagDataValue(this); } BagDataType(DataType inner_type, AnyType any); } | BagDataType extends CollectionDataType { @Override public BagDataValue make() { return new BagDataValue(this); } BagDataType(DataType inner_type, AnyType any); static final String build_bag_name(DataType inner); static BagDataType bag_of(DataType inner, PrimitiveScope pscope); @Override BagDataValue make(); @Override b... | BagDataType extends CollectionDataType { @Override public BagDataValue make() { return new BagDataValue(this); } BagDataType(DataType inner_type, AnyType any); static final String build_bag_name(DataType inner); static BagDataType bag_of(DataType inner, PrimitiveScope pscope); @Override BagDataValue make(); @Override b... |
@Test(expected = IllegalArgumentException.class) public void remove_wrong_type_fails() throws Exception { m_bag.remove(m_scope.bool().make(true)); } | @Override public BagDataValue make() { return new BagDataValue(this); } | BagDataType extends CollectionDataType { @Override public BagDataValue make() { return new BagDataValue(this); } } | BagDataType extends CollectionDataType { @Override public BagDataValue make() { return new BagDataValue(this); } BagDataType(DataType inner_type, AnyType any); } | BagDataType extends CollectionDataType { @Override public BagDataValue make() { return new BagDataValue(this); } BagDataType(DataType inner_type, AnyType any); static final String build_bag_name(DataType inner); static BagDataType bag_of(DataType inner, PrimitiveScope pscope); @Override BagDataValue make(); @Override b... | BagDataType extends CollectionDataType { @Override public BagDataValue make() { return new BagDataValue(this); } BagDataType(DataType inner_type, AnyType any); static final String build_bag_name(DataType inner); static BagDataType bag_of(DataType inner, PrimitiveScope pscope); @Override BagDataValue make(); @Override b... |
@Test(expected = IllegalArgumentException.class) public void contains_wrong_type_fails() throws Exception { m_bag.contains(m_scope.bool().make(true)); } | @Override public BagDataValue make() { return new BagDataValue(this); } | BagDataType extends CollectionDataType { @Override public BagDataValue make() { return new BagDataValue(this); } } | BagDataType extends CollectionDataType { @Override public BagDataValue make() { return new BagDataValue(this); } BagDataType(DataType inner_type, AnyType any); } | BagDataType extends CollectionDataType { @Override public BagDataValue make() { return new BagDataValue(this); } BagDataType(DataType inner_type, AnyType any); static final String build_bag_name(DataType inner); static BagDataType bag_of(DataType inner, PrimitiveScope pscope); @Override BagDataValue make(); @Override b... | BagDataType extends CollectionDataType { @Override public BagDataValue make() { return new BagDataValue(this); } BagDataType(DataType inner_type, AnyType any); static final String build_bag_name(DataType inner); static BagDataType bag_of(DataType inner, PrimitiveScope pscope); @Override BagDataValue make(); @Override b... |
@Test(expected = IllegalArgumentException.class) public void count_wrong_type_fails() throws Exception { m_bag.count(m_scope.bool().make(true)); } | @Override public BagDataValue make() { return new BagDataValue(this); } | BagDataType extends CollectionDataType { @Override public BagDataValue make() { return new BagDataValue(this); } } | BagDataType extends CollectionDataType { @Override public BagDataValue make() { return new BagDataValue(this); } BagDataType(DataType inner_type, AnyType any); } | BagDataType extends CollectionDataType { @Override public BagDataValue make() { return new BagDataValue(this); } BagDataType(DataType inner_type, AnyType any); static final String build_bag_name(DataType inner); static BagDataType bag_of(DataType inner, PrimitiveScope pscope); @Override BagDataValue make(); @Override b... | BagDataType extends CollectionDataType { @Override public BagDataValue make() { return new BagDataValue(this); } BagDataType(DataType inner_type, AnyType any); static final String build_bag_name(DataType inner); static BagDataType bag_of(DataType inner, PrimitiveScope pscope); @Override BagDataValue make(); @Override b... |
@Test public void bag_comparison() throws Exception { BagDataValue v = m_bag_type.make(); assertTrue(v.equals(m_bag)); assertTrue(v.hashCode() == m_bag.hashCode()); BagDataValue sup_v = new BagDataType(m_super_type, m_scope.any()).make(); assertFalse(sup_v.equals(m_bag)); assertTrue(m_bag.add(m_v1)); assertFalse(v.equa... | @Override public BagDataValue make() { return new BagDataValue(this); } | BagDataType extends CollectionDataType { @Override public BagDataValue make() { return new BagDataValue(this); } } | BagDataType extends CollectionDataType { @Override public BagDataValue make() { return new BagDataValue(this); } BagDataType(DataType inner_type, AnyType any); } | BagDataType extends CollectionDataType { @Override public BagDataValue make() { return new BagDataValue(this); } BagDataType(DataType inner_type, AnyType any); static final String build_bag_name(DataType inner); static BagDataType bag_of(DataType inner, PrimitiveScope pscope); @Override BagDataValue make(); @Override b... | BagDataType extends CollectionDataType { @Override public BagDataValue make() { return new BagDataValue(this); } BagDataType(DataType inner_type, AnyType any); static final String build_bag_name(DataType inner); static BagDataType bag_of(DataType inner, PrimitiveScope pscope); @Override BagDataValue make(); @Override b... |
@Test public void obtaining_existing_data_type() throws Exception { BagDataType t = BagDataType.bag_of(m_type, m_scope); assertSame(m_bag_type, t); } | public static BagDataType bag_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_bag_name(inner)); } catch (AmbiguousNameException e) { } if (... | BagDataType extends CollectionDataType { public static BagDataType bag_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_bag_name(inner)); } ... | BagDataType extends CollectionDataType { public static BagDataType bag_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_bag_name(inner)); } ... | BagDataType extends CollectionDataType { public static BagDataType bag_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_bag_name(inner)); } ... | BagDataType extends CollectionDataType { public static BagDataType bag_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_bag_name(inner)); } ... |
@Test public void testDetach() { instance.detach(); assertEquals(instance.isAttached(), false); } | public void detach() { if (attached) { runtimeAgg.stop(); attached = false; if (CREATE_MOCK_RAINBOW) { mockRainbow.cancel(); } } } | ApplicationCore { public void detach() { if (attached) { runtimeAgg.stop(); attached = false; if (CREATE_MOCK_RAINBOW) { mockRainbow.cancel(); } } } } | ApplicationCore { public void detach() { if (attached) { runtimeAgg.stop(); attached = false; if (CREATE_MOCK_RAINBOW) { mockRainbow.cancel(); } } } protected ApplicationCore(); } | ApplicationCore { public void detach() { if (attached) { runtimeAgg.stop(); attached = false; if (CREATE_MOCK_RAINBOW) { mockRainbow.cancel(); } } } protected ApplicationCore(); static ApplicationCore getInstance(); void startup(String filename); void attach(); void detach(); String getWriteSession(); ArrayList<String... | ApplicationCore { public void detach() { if (attached) { runtimeAgg.stop(); attached = false; if (CREATE_MOCK_RAINBOW) { mockRainbow.cancel(); } } } protected ApplicationCore(); static ApplicationCore getInstance(); void startup(String filename); void attach(); void detach(); String getWriteSession(); ArrayList<String... |
@Test public void obtaining_new_data_type() throws Exception { BagDataType t1 = BagDataType.bag_of(m_scope.int8(), m_scope); assertSame(t1, BagDataType.bag_of(m_scope.int8(), m_scope)); } | public static BagDataType bag_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_bag_name(inner)); } catch (AmbiguousNameException e) { } if (... | BagDataType extends CollectionDataType { public static BagDataType bag_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_bag_name(inner)); } ... | BagDataType extends CollectionDataType { public static BagDataType bag_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_bag_name(inner)); } ... | BagDataType extends CollectionDataType { public static BagDataType bag_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_bag_name(inner)); } ... | BagDataType extends CollectionDataType { public static BagDataType bag_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_bag_name(inner)); } ... |
@Test public void create_set_type_check_properties() throws Exception { assertEquals("set<b>", m_set_type.name()); assertTrue(m_set_type.sub_of(m_scope.any())); assertFalse(m_set_type.is_abstract()); assertEquals(m_type, m_set_type.inner_type()); } | @Override public boolean is_abstract() { return false; } | SetDataType extends CollectionDataType { @Override public boolean is_abstract() { return false; } } | SetDataType extends CollectionDataType { @Override public boolean is_abstract() { return false; } SetDataType(DataType inner_type, AnyType any); } | SetDataType extends CollectionDataType { @Override public boolean is_abstract() { return false; } SetDataType(DataType inner_type, AnyType any); static final String build_set_name(DataType inner); static SetDataType set_of(DataType inner, PrimitiveScope pscope); @Override SetDataValue make(); @Override boolean is_abstr... | SetDataType extends CollectionDataType { @Override public boolean is_abstract() { return false; } SetDataType(DataType inner_type, AnyType any); static final String build_set_name(DataType inner); static SetDataType set_of(DataType inner, PrimitiveScope pscope); @Override SetDataValue make(); @Override boolean is_abstr... |
@Test public void add_wrong_types() throws Exception { try { m_set.add(m_scope.bool().make(true)); fail(); } catch (IllegalArgumentException e) { } try { m_set.add(m_vsuper); fail(); } catch (IllegalArgumentException e) { } } | @Override public SetDataValue make() { return new SetDataValue(this); } | SetDataType extends CollectionDataType { @Override public SetDataValue make() { return new SetDataValue(this); } } | SetDataType extends CollectionDataType { @Override public SetDataValue make() { return new SetDataValue(this); } SetDataType(DataType inner_type, AnyType any); } | SetDataType extends CollectionDataType { @Override public SetDataValue make() { return new SetDataValue(this); } SetDataType(DataType inner_type, AnyType any); static final String build_set_name(DataType inner); static SetDataType set_of(DataType inner, PrimitiveScope pscope); @Override SetDataValue make(); @Override b... | SetDataType extends CollectionDataType { @Override public SetDataValue make() { return new SetDataValue(this); } SetDataType(DataType inner_type, AnyType any); static final String build_set_name(DataType inner); static SetDataType set_of(DataType inner, PrimitiveScope pscope); @Override SetDataValue make(); @Override b... |
@Test public void add_remove_check_invalid_parameters() throws Exception { try { m_set.add(null); fail(); } catch (IllegalArgumentException e) { } try { m_set.add(m_scope.bool().make(true)); fail(); } catch (IllegalArgumentException e) { } try { m_set.remove(null); fail(); } catch (IllegalArgumentException e) { } try {... | @Override public SetDataValue make() { return new SetDataValue(this); } | SetDataType extends CollectionDataType { @Override public SetDataValue make() { return new SetDataValue(this); } } | SetDataType extends CollectionDataType { @Override public SetDataValue make() { return new SetDataValue(this); } SetDataType(DataType inner_type, AnyType any); } | SetDataType extends CollectionDataType { @Override public SetDataValue make() { return new SetDataValue(this); } SetDataType(DataType inner_type, AnyType any); static final String build_set_name(DataType inner); static SetDataType set_of(DataType inner, PrimitiveScope pscope); @Override SetDataValue make(); @Override b... | SetDataType extends CollectionDataType { @Override public SetDataValue make() { return new SetDataValue(this); } SetDataType(DataType inner_type, AnyType any); static final String build_set_name(DataType inner); static SetDataType set_of(DataType inner, PrimitiveScope pscope); @Override SetDataValue make(); @Override b... |
@Test public void set_comparison() throws Exception { SetDataValue v = m_set_type.make(); assertTrue(v.equals(m_set)); assertTrue(v.hashCode() == m_set.hashCode()); SetDataValue sup_v = new SetDataType(m_super_type, m_scope.any()).make(); assertFalse(sup_v.equals(m_set)); m_set.add(m_v1); assertFalse(v.equals(m_set)); ... | @Override public SetDataValue make() { return new SetDataValue(this); } | SetDataType extends CollectionDataType { @Override public SetDataValue make() { return new SetDataValue(this); } } | SetDataType extends CollectionDataType { @Override public SetDataValue make() { return new SetDataValue(this); } SetDataType(DataType inner_type, AnyType any); } | SetDataType extends CollectionDataType { @Override public SetDataValue make() { return new SetDataValue(this); } SetDataType(DataType inner_type, AnyType any); static final String build_set_name(DataType inner); static SetDataType set_of(DataType inner, PrimitiveScope pscope); @Override SetDataValue make(); @Override b... | SetDataType extends CollectionDataType { @Override public SetDataValue make() { return new SetDataValue(this); } SetDataType(DataType inner_type, AnyType any); static final String build_set_name(DataType inner); static SetDataType set_of(DataType inner, PrimitiveScope pscope); @Override SetDataValue make(); @Override b... |
@Test public void obtaining_existing_data_type() throws Exception { SetDataType t = SetDataType.set_of(m_type, m_scope); assertSame(m_set_type, t); } | public static SetDataType set_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_set_name(inner)); } catch (AmbiguousNameException e) { } if (... | SetDataType extends CollectionDataType { public static SetDataType set_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_set_name(inner)); } ... | SetDataType extends CollectionDataType { public static SetDataType set_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_set_name(inner)); } ... | SetDataType extends CollectionDataType { public static SetDataType set_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_set_name(inner)); } ... | SetDataType extends CollectionDataType { public static SetDataType set_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_set_name(inner)); } ... |
@Test public void obtaining_new_data_type() throws Exception { SetDataType t1 = SetDataType.set_of(m_scope.int8(), m_scope); assertSame(t1, SetDataType.set_of(m_scope.int8(), m_scope)); } | public static SetDataType set_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_set_name(inner)); } catch (AmbiguousNameException e) { } if (... | SetDataType extends CollectionDataType { public static SetDataType set_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_set_name(inner)); } ... | SetDataType extends CollectionDataType { public static SetDataType set_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_set_name(inner)); } ... | SetDataType extends CollectionDataType { public static SetDataType set_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_set_name(inner)); } ... | SetDataType extends CollectionDataType { public static SetDataType set_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_set_name(inner)); } ... |
@Test(expected = AssertionError.class) public void making_absolute_absolute() throws Exception { HierarchicalName hn = new HierarchicalName(true, "foo"); hn.make_absolute(); } | public HierarchicalName make_absolute() { Ensure.is_false(m_is_absolute); return new HierarchicalName(true, m_names); } | HierarchicalName { public HierarchicalName make_absolute() { Ensure.is_false(m_is_absolute); return new HierarchicalName(true, m_names); } } | HierarchicalName { public HierarchicalName make_absolute() { Ensure.is_false(m_is_absolute); return new HierarchicalName(true, m_names); } HierarchicalName(boolean absolute, List<String> names); HierarchicalName(boolean absolute, String... names); } | HierarchicalName { public HierarchicalName make_absolute() { Ensure.is_false(m_is_absolute); return new HierarchicalName(true, m_names); } HierarchicalName(boolean absolute, List<String> names); HierarchicalName(boolean absolute, String... names); boolean absolute(); String peek(); HierarchicalName pop_first(); boolea... | HierarchicalName { public HierarchicalName make_absolute() { Ensure.is_false(m_is_absolute); return new HierarchicalName(true, m_names); } HierarchicalName(boolean absolute, List<String> names); HierarchicalName(boolean absolute, String... names); boolean absolute(); String peek(); HierarchicalName pop_first(); boolea... |
@Test public void hierarchical_name_as_string() throws Exception { HierarchicalName hn1 = new HierarchicalName(true, "a"); assertEquals("::a", hn1.toString()); HierarchicalName hn2 = new HierarchicalName(true, "a", "b"); assertEquals("::a::b", hn2.toString()); HierarchicalName hn3 = new HierarchicalName(false, "a"); as... | @Override public String toString() { StringBuilder sb = new StringBuilder(); if (m_is_absolute) { sb.append("::"); } for (int i = 0; i < m_names.size(); i++) { if (i > 0) { sb.append("::"); } sb.append(m_names.get(i)); } return sb.toString(); } | HierarchicalName { @Override public String toString() { StringBuilder sb = new StringBuilder(); if (m_is_absolute) { sb.append("::"); } for (int i = 0; i < m_names.size(); i++) { if (i > 0) { sb.append("::"); } sb.append(m_names.get(i)); } return sb.toString(); } } | HierarchicalName { @Override public String toString() { StringBuilder sb = new StringBuilder(); if (m_is_absolute) { sb.append("::"); } for (int i = 0; i < m_names.size(); i++) { if (i > 0) { sb.append("::"); } sb.append(m_names.get(i)); } return sb.toString(); } HierarchicalName(boolean absolute, List<String> names); ... | HierarchicalName { @Override public String toString() { StringBuilder sb = new StringBuilder(); if (m_is_absolute) { sb.append("::"); } for (int i = 0; i < m_names.size(); i++) { if (i > 0) { sb.append("::"); } sb.append(m_names.get(i)); } return sb.toString(); } HierarchicalName(boolean absolute, List<String> names); ... | HierarchicalName { @Override public String toString() { StringBuilder sb = new StringBuilder(); if (m_is_absolute) { sb.append("::"); } for (int i = 0; i < m_names.size(); i++) { if (i > 0) { sb.append("::"); } sb.append(m_names.get(i)); } return sb.toString(); } HierarchicalName(boolean absolute, List<String> names); ... |
@Test public void compare_to_invalid() throws Exception { HierarchicalName hn = new HierarchicalName(false, "foo"); assertFalse(hn.equals((Object) null)); assertFalse(hn.equals(23)); } | @Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof HierarchicalName)) { return false; } HierarchicalName hn = (HierarchicalName) obj; return hn.m_is_absolute == m_is_absolute && hn.m_names.equals(m_names); } | HierarchicalName { @Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof HierarchicalName)) { return false; } HierarchicalName hn = (HierarchicalName) obj; return hn.m_is_absolute == m_is_absolute && hn.m_names.equals(m_names); } } | HierarchicalName { @Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof HierarchicalName)) { return false; } HierarchicalName hn = (HierarchicalName) obj; return hn.m_is_absolute == m_is_absolute && hn.m_names.equals(m_names); } HierarchicalName(boolean absolute, List<String> names); Hiera... | HierarchicalName { @Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof HierarchicalName)) { return false; } HierarchicalName hn = (HierarchicalName) obj; return hn.m_is_absolute == m_is_absolute && hn.m_names.equals(m_names); } HierarchicalName(boolean absolute, List<String> names); Hiera... | HierarchicalName { @Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof HierarchicalName)) { return false; } HierarchicalName hn = (HierarchicalName) obj; return hn.m_is_absolute == m_is_absolute && hn.m_names.equals(m_names); } HierarchicalName(boolean absolute, List<String> names); Hiera... |
@Test public void testGetSessionList() { ArrayList<String> result = instance.getSessionList(); assertNotNull(result); } | public ArrayList<String> getSessionList() { return databaseCon.getSessionList(); } | ApplicationCore { public ArrayList<String> getSessionList() { return databaseCon.getSessionList(); } } | ApplicationCore { public ArrayList<String> getSessionList() { return databaseCon.getSessionList(); } protected ApplicationCore(); } | ApplicationCore { public ArrayList<String> getSessionList() { return databaseCon.getSessionList(); } protected ApplicationCore(); static ApplicationCore getInstance(); void startup(String filename); void attach(); void detach(); String getWriteSession(); ArrayList<String> getSessionList(); boolean isAttached(); static... | ApplicationCore { public ArrayList<String> getSessionList() { return databaseCon.getSessionList(); } protected ApplicationCore(); static ApplicationCore getInstance(); void startup(String filename); void attach(); void detach(); String getWriteSession(); ArrayList<String> getSessionList(); boolean isAttached(); static... |
@Test(expected = AssertionError.class) public void global_scopes_cannot_be_added_to_other_scopes() throws Exception { TestScope gs = new TestScope(); TestScope gs2 = new TestScope(); gs.add(gs2); } | public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m_name) !... | Scope { public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m... | Scope { public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m... | Scope { public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m... | Scope { public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m... |
@Test public void adding_duplicate_objects_in_scope() throws Exception { TestScope s = new TestScope(); s.add(new ScopedObject("s1")); s.add(new Scope<>("s2")); try { s.add(new ScopedObject("s1")); fail(); } catch (IllegalStateException e) { } try { s.add(new TestScope("s1")); fail(); } catch (IllegalStateException e) ... | public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m_name) !... | Scope { public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m... | Scope { public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m... | Scope { public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m... | Scope { public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m... |
@Test public void creating_cyclic_linkage_structures() throws Exception { TestScope s1 = new TestScope(); TestScope s2 = new TestScope(); TestScope s3 = new TestScope(); s1.link(s2); s3.link(s1); try { s2.link(s1); fail(); } catch (CyclicScopeLinkageException e) { } try { s2.link(s3); fail(); } catch (CyclicScopeLinkag... | public synchronized final void link(Scope<T> scope) throws CyclicScopeLinkageException { Ensure.not_null(scope); Ensure.is_false(m_linked.contains(scope)); Set<Scope<T>> current = new HashSet<>(); current.addAll(m_linked); current.add(scope); Set<Scope<T>> seen = new HashSet<>(current); do { current = follow_set(curren... | Scope { public synchronized final void link(Scope<T> scope) throws CyclicScopeLinkageException { Ensure.not_null(scope); Ensure.is_false(m_linked.contains(scope)); Set<Scope<T>> current = new HashSet<>(); current.addAll(m_linked); current.add(scope); Set<Scope<T>> seen = new HashSet<>(current); do { current = follow_se... | Scope { public synchronized final void link(Scope<T> scope) throws CyclicScopeLinkageException { Ensure.not_null(scope); Ensure.is_false(m_linked.contains(scope)); Set<Scope<T>> current = new HashSet<>(); current.addAll(m_linked); current.add(scope); Set<Scope<T>> seen = new HashSet<>(current); do { current = follow_se... | Scope { public synchronized final void link(Scope<T> scope) throws CyclicScopeLinkageException { Ensure.not_null(scope); Ensure.is_false(m_linked.contains(scope)); Set<Scope<T>> current = new HashSet<>(); current.addAll(m_linked); current.add(scope); Set<Scope<T>> seen = new HashSet<>(current); do { current = follow_se... | Scope { public synchronized final void link(Scope<T> scope) throws CyclicScopeLinkageException { Ensure.not_null(scope); Ensure.is_false(m_linked.contains(scope)); Set<Scope<T>> current = new HashSet<>(); current.addAll(m_linked); current.add(scope); Set<Scope<T>> seen = new HashSet<>(current); do { current = follow_se... |
@Test(expected = AssertionError.class) public void adding_null_scope_to_scope() throws Exception { TestScope s = new TestScope(); s.add((TestScope) null); } | public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m_name) !... | Scope { public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m... | Scope { public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m... | Scope { public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m... | Scope { public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m... |
@Test(expected = AssertionError.class) public void adding_null_scoped_object_to_scope() throws Exception { TestScope s = new TestScope(); s.add((ScopedObject) null); } | public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m_name) !... | Scope { public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m... | Scope { public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m... | Scope { public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m... | Scope { public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m... |
@Test(expected = AssertionError.class) public void linking_null_scope() throws Exception { TestScope s = new TestScope(); s.link(null); } | public synchronized final void link(Scope<T> scope) throws CyclicScopeLinkageException { Ensure.not_null(scope); Ensure.is_false(m_linked.contains(scope)); Set<Scope<T>> current = new HashSet<>(); current.addAll(m_linked); current.add(scope); Set<Scope<T>> seen = new HashSet<>(current); do { current = follow_set(curren... | Scope { public synchronized final void link(Scope<T> scope) throws CyclicScopeLinkageException { Ensure.not_null(scope); Ensure.is_false(m_linked.contains(scope)); Set<Scope<T>> current = new HashSet<>(); current.addAll(m_linked); current.add(scope); Set<Scope<T>> seen = new HashSet<>(current); do { current = follow_se... | Scope { public synchronized final void link(Scope<T> scope) throws CyclicScopeLinkageException { Ensure.not_null(scope); Ensure.is_false(m_linked.contains(scope)); Set<Scope<T>> current = new HashSet<>(); current.addAll(m_linked); current.add(scope); Set<Scope<T>> seen = new HashSet<>(current); do { current = follow_se... | Scope { public synchronized final void link(Scope<T> scope) throws CyclicScopeLinkageException { Ensure.not_null(scope); Ensure.is_false(m_linked.contains(scope)); Set<Scope<T>> current = new HashSet<>(); current.addAll(m_linked); current.add(scope); Set<Scope<T>> seen = new HashSet<>(current); do { current = follow_se... | Scope { public synchronized final void link(Scope<T> scope) throws CyclicScopeLinkageException { Ensure.not_null(scope); Ensure.is_false(m_linked.contains(scope)); Set<Scope<T>> current = new HashSet<>(); current.addAll(m_linked); current.add(scope); Set<Scope<T>> seen = new HashSet<>(current); do { current = follow_se... |
@Test(expected = AssertionError.class) public void finding_object_with_null_string() throws Exception { TestScope s = new TestScope(); s.find((String) null); } | public synchronized T find(String name) throws AmbiguousNameException { return find(new HierarchicalName(false, name)); } | Scope { public synchronized T find(String name) throws AmbiguousNameException { return find(new HierarchicalName(false, name)); } } | Scope { public synchronized T find(String name) throws AmbiguousNameException { return find(new HierarchicalName(false, name)); } Scope(String name); } | Scope { public synchronized T find(String name) throws AmbiguousNameException { return find(new HierarchicalName(false, name)); } Scope(String name); final String name(); final Scope<T> parent(); final HierarchicalName absolute_hname(); synchronized final void add(Scope<T> scope); synchronized final void add(T obj); sy... | Scope { public synchronized T find(String name) throws AmbiguousNameException { return find(new HierarchicalName(false, name)); } Scope(String name); final String name(); final Scope<T> parent(); final HierarchicalName absolute_hname(); synchronized final void add(Scope<T> scope); synchronized final void add(T obj); sy... |
@Test(expected = AssertionError.class) public void finding_object_with_null_hierarchical_name() throws Exception { TestScope s = new TestScope(); s.find((HierarchicalName) null); } | public synchronized T find(String name) throws AmbiguousNameException { return find(new HierarchicalName(false, name)); } | Scope { public synchronized T find(String name) throws AmbiguousNameException { return find(new HierarchicalName(false, name)); } } | Scope { public synchronized T find(String name) throws AmbiguousNameException { return find(new HierarchicalName(false, name)); } Scope(String name); } | Scope { public synchronized T find(String name) throws AmbiguousNameException { return find(new HierarchicalName(false, name)); } Scope(String name); final String name(); final Scope<T> parent(); final HierarchicalName absolute_hname(); synchronized final void add(Scope<T> scope); synchronized final void add(T obj); sy... | Scope { public synchronized T find(String name) throws AmbiguousNameException { return find(new HierarchicalName(false, name)); } Scope(String name); final String name(); final Scope<T> parent(); final HierarchicalName absolute_hname(); synchronized final void add(Scope<T> scope); synchronized final void add(T obj); sy... |
@Test(expected = AssertionError.class) public void finding_scope_with_null_string() throws Exception { TestScope s = new TestScope(); s.find_scope((String) null); } | public synchronized Scope<T> find_scope(String name) throws AmbiguousNameException { return find_scope(new HierarchicalName(false, name)); } | Scope { public synchronized Scope<T> find_scope(String name) throws AmbiguousNameException { return find_scope(new HierarchicalName(false, name)); } } | Scope { public synchronized Scope<T> find_scope(String name) throws AmbiguousNameException { return find_scope(new HierarchicalName(false, name)); } Scope(String name); } | Scope { public synchronized Scope<T> find_scope(String name) throws AmbiguousNameException { return find_scope(new HierarchicalName(false, name)); } Scope(String name); final String name(); final Scope<T> parent(); final HierarchicalName absolute_hname(); synchronized final void add(Scope<T> scope); synchronized final ... | Scope { public synchronized Scope<T> find_scope(String name) throws AmbiguousNameException { return find_scope(new HierarchicalName(false, name)); } Scope(String name); final String name(); final Scope<T> parent(); final HierarchicalName absolute_hname(); synchronized final void add(Scope<T> scope); synchronized final ... |
@Test(expected = AssertionError.class) public void finding_scope_with_null_hierarchical_name() throws Exception { TestScope s = new TestScope(); s.find_scope((HierarchicalName) null); } | public synchronized Scope<T> find_scope(String name) throws AmbiguousNameException { return find_scope(new HierarchicalName(false, name)); } | Scope { public synchronized Scope<T> find_scope(String name) throws AmbiguousNameException { return find_scope(new HierarchicalName(false, name)); } } | Scope { public synchronized Scope<T> find_scope(String name) throws AmbiguousNameException { return find_scope(new HierarchicalName(false, name)); } Scope(String name); } | Scope { public synchronized Scope<T> find_scope(String name) throws AmbiguousNameException { return find_scope(new HierarchicalName(false, name)); } Scope(String name); final String name(); final Scope<T> parent(); final HierarchicalName absolute_hname(); synchronized final void add(Scope<T> scope); synchronized final ... | Scope { public synchronized Scope<T> find_scope(String name) throws AmbiguousNameException { return find_scope(new HierarchicalName(false, name)); } Scope(String name); final String name(); final Scope<T> parent(); final HierarchicalName absolute_hname(); synchronized final void add(Scope<T> scope); synchronized final ... |
@Test public void testIsAttached() { boolean expResult = true; instance.attach(); boolean result = instance.isAttached(); assertEquals(expResult, result); } | public boolean isAttached() { return attached; } | ApplicationCore { public boolean isAttached() { return attached; } } | ApplicationCore { public boolean isAttached() { return attached; } protected ApplicationCore(); } | ApplicationCore { public boolean isAttached() { return attached; } protected ApplicationCore(); static ApplicationCore getInstance(); void startup(String filename); void attach(); void detach(); String getWriteSession(); ArrayList<String> getSessionList(); boolean isAttached(); static void registerWidgets(); IRuntimeA... | ApplicationCore { public boolean isAttached() { return attached; } protected ApplicationCore(); static ApplicationCore getInstance(); void startup(String filename); void attach(); void detach(); String getWriteSession(); ArrayList<String> getSessionList(); boolean isAttached(); static void registerWidgets(); IRuntimeA... |
@Test(expected = AssertionError.class) public void linking_same_scope_twice() throws Exception { TestScope s1 = new TestScope(); TestScope l = new TestScope(); s1.link(l); s1.link(l); } | public synchronized final void link(Scope<T> scope) throws CyclicScopeLinkageException { Ensure.not_null(scope); Ensure.is_false(m_linked.contains(scope)); Set<Scope<T>> current = new HashSet<>(); current.addAll(m_linked); current.add(scope); Set<Scope<T>> seen = new HashSet<>(current); do { current = follow_set(curren... | Scope { public synchronized final void link(Scope<T> scope) throws CyclicScopeLinkageException { Ensure.not_null(scope); Ensure.is_false(m_linked.contains(scope)); Set<Scope<T>> current = new HashSet<>(); current.addAll(m_linked); current.add(scope); Set<Scope<T>> seen = new HashSet<>(current); do { current = follow_se... | Scope { public synchronized final void link(Scope<T> scope) throws CyclicScopeLinkageException { Ensure.not_null(scope); Ensure.is_false(m_linked.contains(scope)); Set<Scope<T>> current = new HashSet<>(); current.addAll(m_linked); current.add(scope); Set<Scope<T>> seen = new HashSet<>(current); do { current = follow_se... | Scope { public synchronized final void link(Scope<T> scope) throws CyclicScopeLinkageException { Ensure.not_null(scope); Ensure.is_false(m_linked.contains(scope)); Set<Scope<T>> current = new HashSet<>(); current.addAll(m_linked); current.add(scope); Set<Scope<T>> seen = new HashSet<>(current); do { current = follow_se... | Scope { public synchronized final void link(Scope<T> scope) throws CyclicScopeLinkageException { Ensure.not_null(scope); Ensure.is_false(m_linked.contains(scope)); Set<Scope<T>> current = new HashSet<>(); current.addAll(m_linked); current.add(scope); Set<Scope<T>> seen = new HashSet<>(current); do { current = follow_se... |
@Test public void check_object_in_its_own_scope() throws Exception { TestScope s0 = new TestScope(); ScopedObject o0 = new ScopedObject("x"); s0.add(o0); assertTrue(o0.in_scope(s0)); } | public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m_name) !... | Scope { public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m... | Scope { public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m... | Scope { public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m... | Scope { public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m... |
@Test public void check_object_in_its_parent_scope() throws Exception { TestScope s0 = new TestScope(); TestScope s1 = new TestScope("s"); s0.add(s1); ScopedObject o1 = new ScopedObject("x"); s1.add(o1); assertTrue(o1.in_scope(s0)); } | public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m_name) !... | Scope { public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m... | Scope { public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m... | Scope { public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m... | Scope { public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m... |
@Test public void check_object_not_in_sub_scope() throws Exception { TestScope s0 = new TestScope(); TestScope s1 = new TestScope("s"); s0.add(s1); ScopedObject o0 = new ScopedObject("x"); s0.add(o0); assertFalse(o0.in_scope(s1)); } | public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m_name) !... | Scope { public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m... | Scope { public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m... | Scope { public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m... | Scope { public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scopes.get(scope.m... |
@Test public void self_child_check_test() throws Exception { TestScope s0 = new TestScope(); assertFalse(s0.child_scope_of(s0)); } | public synchronized boolean child_scope_of(Scope<?> scope) { Ensure.not_null(scope); for (Scope<?> p = m_parent; p != null; p = p.m_parent) { if (p == scope) { return true; } } return false; } | Scope { public synchronized boolean child_scope_of(Scope<?> scope) { Ensure.not_null(scope); for (Scope<?> p = m_parent; p != null; p = p.m_parent) { if (p == scope) { return true; } } return false; } } | Scope { public synchronized boolean child_scope_of(Scope<?> scope) { Ensure.not_null(scope); for (Scope<?> p = m_parent; p != null; p = p.m_parent) { if (p == scope) { return true; } } return false; } Scope(String name); } | Scope { public synchronized boolean child_scope_of(Scope<?> scope) { Ensure.not_null(scope); for (Scope<?> p = m_parent; p != null; p = p.m_parent) { if (p == scope) { return true; } } return false; } Scope(String name); final String name(); final Scope<T> parent(); final HierarchicalName absolute_hname(); synchronized... | Scope { public synchronized boolean child_scope_of(Scope<?> scope) { Ensure.not_null(scope); for (Scope<?> p = m_parent; p != null; p = p.m_parent) { if (p == scope) { return true; } } return false; } Scope(String name); final String name(); final Scope<T> parent(); final HierarchicalName absolute_hname(); synchronized... |
@Test public void local_changes_are_propagated_to_server_and_back() throws Exception { m_slave.sync_now_wait(); TestSyncScb s = new TestSyncScb(0, SyncStatus.UNKNOWN, "foo"); m_c0.add_scb(s); m_dispatcher_helper.wait_dispatch_clear(); assertEquals(1, m_c0.all_scbs().size()); assertEquals(SyncStatus.LOCAL_CHANGES, s.syn... | public synchronized void sync_now_wait() { int prev_count = m_sync_count; do { sync_now(); try { wait(WAIT_FOR_SYNC_TIME_MS); } catch (InterruptedException e) { } } while (m_sync_count == prev_count); } | SyncScbSlave { public synchronized void sync_now_wait() { int prev_count = m_sync_count; do { sync_now(); try { wait(WAIT_FOR_SYNC_TIME_MS); } catch (InterruptedException e) { } } while (m_sync_count == prev_count); } } | SyncScbSlave { public synchronized void sync_now_wait() { int prev_count = m_sync_count; do { sync_now(); try { wait(WAIT_FOR_SYNC_TIME_MS); } catch (InterruptedException e) { } } while (m_sync_count == prev_count); } SyncScbSlave(SyncScbMaster master, long poll_interval_ms); } | SyncScbSlave { public synchronized void sync_now_wait() { int prev_count = m_sync_count; do { sync_now(); try { wait(WAIT_FOR_SYNC_TIME_MS); } catch (InterruptedException e) { } } while (m_sync_count == prev_count); } SyncScbSlave(SyncScbMaster master, long poll_interval_ms); synchronized Date last_sync_date(); synchro... | SyncScbSlave { public synchronized void sync_now_wait() { int prev_count = m_sync_count; do { sync_now(); try { wait(WAIT_FOR_SYNC_TIME_MS); } catch (InterruptedException e) { } } while (m_sync_count == prev_count); } SyncScbSlave(SyncScbMaster master, long poll_interval_ms); synchronized Date last_sync_date(); synchro... |
@Test(expected = IllegalArgumentException.class) public void publish_null_object() throws Exception { RmiServerPublisher.publish_service(TService.class, null); RmiServerPublisher.publish_service(null, new TService()); } | public static int publish_service(Class<?> cls, Object obj) throws RmiCommException { return publish_service(cls, obj, 0); } | RmiServerPublisher { public static int publish_service(Class<?> cls, Object obj) throws RmiCommException { return publish_service(cls, obj, 0); } } | RmiServerPublisher { public static int publish_service(Class<?> cls, Object obj) throws RmiCommException { return publish_service(cls, obj, 0); } } | RmiServerPublisher { public static int publish_service(Class<?> cls, Object obj) throws RmiCommException { return publish_service(cls, obj, 0); } static int publish_service(Class<?> cls, Object obj); static int publish_service(Class<?> cls, Object obj, int port); static void shutdown_all(); } | RmiServerPublisher { public static int publish_service(Class<?> cls, Object obj) throws RmiCommException { return publish_service(cls, obj, 0); } static int publish_service(Class<?> cls, Object obj); static int publish_service(Class<?> cls, Object obj, int port); static void shutdown_all(); } |
@Test(expected = IllegalArgumentException.class) public void publish_null_interface() throws Exception { RmiServerPublisher.publish_service(null, new TService()); } | public static int publish_service(Class<?> cls, Object obj) throws RmiCommException { return publish_service(cls, obj, 0); } | RmiServerPublisher { public static int publish_service(Class<?> cls, Object obj) throws RmiCommException { return publish_service(cls, obj, 0); } } | RmiServerPublisher { public static int publish_service(Class<?> cls, Object obj) throws RmiCommException { return publish_service(cls, obj, 0); } } | RmiServerPublisher { public static int publish_service(Class<?> cls, Object obj) throws RmiCommException { return publish_service(cls, obj, 0); } static int publish_service(Class<?> cls, Object obj); static int publish_service(Class<?> cls, Object obj, int port); static void shutdown_all(); } | RmiServerPublisher { public static int publish_service(Class<?> cls, Object obj) throws RmiCommException { return publish_service(cls, obj, 0); } static int publish_service(Class<?> cls, Object obj); static int publish_service(Class<?> cls, Object obj, int port); static void shutdown_all(); } |
@Test public void publish_respects_communication_ports() throws Exception { int cnt = 5; for (int i = 0; i < cnt; i++) { TService ts = new TService(); ts.m_val = i; String pp = RmiCommunicationPorts.class.getName(); int rnd = 14000 + RandomUtils.nextInt(2000); System.setProperty(pp + ".min-port", "" + rnd); System.setP... | public static int publish_service(Class<?> cls, Object obj) throws RmiCommException { return publish_service(cls, obj, 0); } | RmiServerPublisher { public static int publish_service(Class<?> cls, Object obj) throws RmiCommException { return publish_service(cls, obj, 0); } } | RmiServerPublisher { public static int publish_service(Class<?> cls, Object obj) throws RmiCommException { return publish_service(cls, obj, 0); } } | RmiServerPublisher { public static int publish_service(Class<?> cls, Object obj) throws RmiCommException { return publish_service(cls, obj, 0); } static int publish_service(Class<?> cls, Object obj); static int publish_service(Class<?> cls, Object obj, int port); static void shutdown_all(); } | RmiServerPublisher { public static int publish_service(Class<?> cls, Object obj) throws RmiCommException { return publish_service(cls, obj, 0); } static int publish_service(Class<?> cls, Object obj); static int publish_service(Class<?> cls, Object obj, int port); static void shutdown_all(); } |
@Test public void publish_on_specific_port() throws Exception { final int iterationCount = 100; final int minAllowOk = 80; int done = 0; for (int i = 0; i < iterationCount; i++) { int p = 1025 + RandomUtils.nextInt(10000); try (Socket s = new Socket()) { s.connect(new InetSocketAddress(InetAddress.getLocalHost(), p), 5... | public static int publish_service(Class<?> cls, Object obj) throws RmiCommException { return publish_service(cls, obj, 0); } | RmiServerPublisher { public static int publish_service(Class<?> cls, Object obj) throws RmiCommException { return publish_service(cls, obj, 0); } } | RmiServerPublisher { public static int publish_service(Class<?> cls, Object obj) throws RmiCommException { return publish_service(cls, obj, 0); } } | RmiServerPublisher { public static int publish_service(Class<?> cls, Object obj) throws RmiCommException { return publish_service(cls, obj, 0); } static int publish_service(Class<?> cls, Object obj); static int publish_service(Class<?> cls, Object obj, int port); static void shutdown_all(); } | RmiServerPublisher { public static int publish_service(Class<?> cls, Object obj) throws RmiCommException { return publish_service(cls, obj, 0); } static int publish_service(Class<?> cls, Object obj); static int publish_service(Class<?> cls, Object obj, int port); static void shutdown_all(); } |
@Test public void testSubUpdate() throws Exception { System.out.println("subUpdate"); AcmeGraph instance = new AcmeGraph(dummyUI); instance.update(); Graph graph = instance.getGraphLayer().getGraph(); Node server0 = graph.nodes.get("ZNewsSys.Server0"); assertNotNull(server0); Node server1 = graph.nodes.get("ZNewsSys.Se... | @Override protected void subUpdate() { IAcmeSystem newSystem = (IAcmeSystem) ModelHelper .getElementFromQualifiedName(model, currentSystem.getQualifiedName()); if (newSystem != null) { currentSystem = newSystem; } else { currentSystem = model; Logger.getLogger(AcmeGraph.class.getName()).log(Level.INFO, "The system {0} ... | AcmeGraph extends AcmeModelView { @Override protected void subUpdate() { IAcmeSystem newSystem = (IAcmeSystem) ModelHelper .getElementFromQualifiedName(model, currentSystem.getQualifiedName()); if (newSystem != null) { currentSystem = newSystem; } else { currentSystem = model; Logger.getLogger(AcmeGraph.class.getName()... | AcmeGraph extends AcmeModelView { @Override protected void subUpdate() { IAcmeSystem newSystem = (IAcmeSystem) ModelHelper .getElementFromQualifiedName(model, currentSystem.getQualifiedName()); if (newSystem != null) { currentSystem = newSystem; } else { currentSystem = model; Logger.getLogger(AcmeGraph.class.getName()... | AcmeGraph extends AcmeModelView { @Override protected void subUpdate() { IAcmeSystem newSystem = (IAcmeSystem) ModelHelper .getElementFromQualifiedName(model, currentSystem.getQualifiedName()); if (newSystem != null) { currentSystem = newSystem; } else { currentSystem = model; Logger.getLogger(AcmeGraph.class.getName()... | AcmeGraph extends AcmeModelView { @Override protected void subUpdate() { IAcmeSystem newSystem = (IAcmeSystem) ModelHelper .getElementFromQualifiedName(model, currentSystem.getQualifiedName()); if (newSystem != null) { currentSystem = newSystem; } else { currentSystem = model; Logger.getLogger(AcmeGraph.class.getName()... |
@Test public void find_open_ports_with_no_open() throws Exception { generate_port_spawn(10); PortListener pl = new PortListener(); ScanListener sl = new ScanListener(); RmiClientDiscovery.find_open_ports("localhost", m_pmin, m_pmax, pl, sl); assertEquals(0, pl.m_ports.length); assertEquals(10, sl.m_count); assertEquals... | public static void find_open_ports(String host, int min_port, int max_port, PortFoundListener listener, PortScanListener scan_listener) { if (host == null) { throw new IllegalArgumentException("host == null"); } if (listener == null) { throw new IllegalArgumentException("listener == null"); } if (min_port <= 0) { throw... | RmiClientDiscovery { public static void find_open_ports(String host, int min_port, int max_port, PortFoundListener listener, PortScanListener scan_listener) { if (host == null) { throw new IllegalArgumentException("host == null"); } if (listener == null) { throw new IllegalArgumentException("listener == null"); } if (m... | RmiClientDiscovery { public static void find_open_ports(String host, int min_port, int max_port, PortFoundListener listener, PortScanListener scan_listener) { if (host == null) { throw new IllegalArgumentException("host == null"); } if (listener == null) { throw new IllegalArgumentException("listener == null"); } if (m... | RmiClientDiscovery { public static void find_open_ports(String host, int min_port, int max_port, PortFoundListener listener, PortScanListener scan_listener) { if (host == null) { throw new IllegalArgumentException("host == null"); } if (listener == null) { throw new IllegalArgumentException("listener == null"); } if (m... | RmiClientDiscovery { public static void find_open_ports(String host, int min_port, int max_port, PortFoundListener listener, PortScanListener scan_listener) { if (host == null) { throw new IllegalArgumentException("host == null"); } if (listener == null) { throw new IllegalArgumentException("listener == null"); } if (m... |
@Test public void find_open_ports_with_random_open() throws Exception { generate_port_spawn(10); PortListener pl = new PortListener(); ScanListener sl = new ScanListener(); open_random_ports(1, 3, m_pmin - 5, m_pmin - 1); open_random_ports(1, 3, m_pmax + 1, m_pmax + 5); int inside[] = open_random_ports(1, 5, m_pmin, m_... | public static void find_open_ports(String host, int min_port, int max_port, PortFoundListener listener, PortScanListener scan_listener) { if (host == null) { throw new IllegalArgumentException("host == null"); } if (listener == null) { throw new IllegalArgumentException("listener == null"); } if (min_port <= 0) { throw... | RmiClientDiscovery { public static void find_open_ports(String host, int min_port, int max_port, PortFoundListener listener, PortScanListener scan_listener) { if (host == null) { throw new IllegalArgumentException("host == null"); } if (listener == null) { throw new IllegalArgumentException("listener == null"); } if (m... | RmiClientDiscovery { public static void find_open_ports(String host, int min_port, int max_port, PortFoundListener listener, PortScanListener scan_listener) { if (host == null) { throw new IllegalArgumentException("host == null"); } if (listener == null) { throw new IllegalArgumentException("listener == null"); } if (m... | RmiClientDiscovery { public static void find_open_ports(String host, int min_port, int max_port, PortFoundListener listener, PortScanListener scan_listener) { if (host == null) { throw new IllegalArgumentException("host == null"); } if (listener == null) { throw new IllegalArgumentException("listener == null"); } if (m... | RmiClientDiscovery { public static void find_open_ports(String host, int min_port, int max_port, PortFoundListener listener, PortScanListener scan_listener) { if (host == null) { throw new IllegalArgumentException("host == null"); } if (listener == null) { throw new IllegalArgumentException("listener == null"); } if (m... |
@Test public void find_client_with_closed_port() throws Exception { generate_port_spawn(5); assertNull(RmiClientDiscovery.find_rmi_client("localhost", m_pmin, RIntf.class)); } | public static <T> T find_rmi_client(String host, int port, Class<T> iface) { try { Client c = new Client(host, port); return iface.cast(c.lookup(iface)); } catch (Exception e) { } return null; } | RmiClientDiscovery { public static <T> T find_rmi_client(String host, int port, Class<T> iface) { try { Client c = new Client(host, port); return iface.cast(c.lookup(iface)); } catch (Exception e) { } return null; } } | RmiClientDiscovery { public static <T> T find_rmi_client(String host, int port, Class<T> iface) { try { Client c = new Client(host, port); return iface.cast(c.lookup(iface)); } catch (Exception e) { } return null; } } | RmiClientDiscovery { public static <T> T find_rmi_client(String host, int port, Class<T> iface) { try { Client c = new Client(host, port); return iface.cast(c.lookup(iface)); } catch (Exception e) { } return null; } static void find_open_ports(String host, int min_port, int max_port,
PortFoundListener listener, Por... | RmiClientDiscovery { public static <T> T find_rmi_client(String host, int port, Class<T> iface) { try { Client c = new Client(host, port); return iface.cast(c.lookup(iface)); } catch (Exception e) { } return null; } static void find_open_ports(String host, int min_port, int max_port,
PortFoundListener listener, Por... |
@Test public void find_client_with_non_rmi_in_port() throws Exception { generate_port_spawn(5); @SuppressWarnings("unused") RandomService rs = new RandomService(m_pmin); assertNull(RmiClientDiscovery.find_rmi_client("localhost", m_pmin, RIntf.class)); } | public static <T> T find_rmi_client(String host, int port, Class<T> iface) { try { Client c = new Client(host, port); return iface.cast(c.lookup(iface)); } catch (Exception e) { } return null; } | RmiClientDiscovery { public static <T> T find_rmi_client(String host, int port, Class<T> iface) { try { Client c = new Client(host, port); return iface.cast(c.lookup(iface)); } catch (Exception e) { } return null; } } | RmiClientDiscovery { public static <T> T find_rmi_client(String host, int port, Class<T> iface) { try { Client c = new Client(host, port); return iface.cast(c.lookup(iface)); } catch (Exception e) { } return null; } } | RmiClientDiscovery { public static <T> T find_rmi_client(String host, int port, Class<T> iface) { try { Client c = new Client(host, port); return iface.cast(c.lookup(iface)); } catch (Exception e) { } return null; } static void find_open_ports(String host, int min_port, int max_port,
PortFoundListener listener, Por... | RmiClientDiscovery { public static <T> T find_rmi_client(String host, int port, Class<T> iface) { try { Client c = new Client(host, port); return iface.cast(c.lookup(iface)); } catch (Exception e) { } return null; } static void find_open_ports(String host, int min_port, int max_port,
PortFoundListener listener, Por... |
@Test public void testFindClientWithRmiWrongClassInPort() throws Exception { generate_port_spawn(5); RmiServerPublisher.publish_service(RIntf2.class, new RImpl2(), m_pmin); Object o = RmiClientDiscovery.find_rmi_client("localhost", m_pmin, RIntf.class); assertNull(o); } | public static <T> T find_rmi_client(String host, int port, Class<T> iface) { try { Client c = new Client(host, port); return iface.cast(c.lookup(iface)); } catch (Exception e) { } return null; } | RmiClientDiscovery { public static <T> T find_rmi_client(String host, int port, Class<T> iface) { try { Client c = new Client(host, port); return iface.cast(c.lookup(iface)); } catch (Exception e) { } return null; } } | RmiClientDiscovery { public static <T> T find_rmi_client(String host, int port, Class<T> iface) { try { Client c = new Client(host, port); return iface.cast(c.lookup(iface)); } catch (Exception e) { } return null; } } | RmiClientDiscovery { public static <T> T find_rmi_client(String host, int port, Class<T> iface) { try { Client c = new Client(host, port); return iface.cast(c.lookup(iface)); } catch (Exception e) { } return null; } static void find_open_ports(String host, int min_port, int max_port,
PortFoundListener listener, Por... | RmiClientDiscovery { public static <T> T find_rmi_client(String host, int port, Class<T> iface) { try { Client c = new Client(host, port); return iface.cast(c.lookup(iface)); } catch (Exception e) { } return null; } static void find_open_ports(String host, int min_port, int max_port,
PortFoundListener listener, Por... |
@Test public void testFindClientWithRmiRightClassInPort() throws Exception { generate_port_spawn(5); RmiServerPublisher.publish_service(RIntf.class, new RImpl(), m_pmin); Object o = RmiClientDiscovery.find_rmi_client("localhost", m_pmin, RIntf.class); assertNotNull(o); assertTrue(o instanceof RIntf); } | public static <T> T find_rmi_client(String host, int port, Class<T> iface) { try { Client c = new Client(host, port); return iface.cast(c.lookup(iface)); } catch (Exception e) { } return null; } | RmiClientDiscovery { public static <T> T find_rmi_client(String host, int port, Class<T> iface) { try { Client c = new Client(host, port); return iface.cast(c.lookup(iface)); } catch (Exception e) { } return null; } } | RmiClientDiscovery { public static <T> T find_rmi_client(String host, int port, Class<T> iface) { try { Client c = new Client(host, port); return iface.cast(c.lookup(iface)); } catch (Exception e) { } return null; } } | RmiClientDiscovery { public static <T> T find_rmi_client(String host, int port, Class<T> iface) { try { Client c = new Client(host, port); return iface.cast(c.lookup(iface)); } catch (Exception e) { } return null; } static void find_open_ports(String host, int min_port, int max_port,
PortFoundListener listener, Por... | RmiClientDiscovery { public static <T> T find_rmi_client(String host, int port, Class<T> iface) { try { Client c = new Client(host, port); return iface.cast(c.lookup(iface)); } catch (Exception e) { } return null; } static void find_open_ports(String host, int min_port, int max_port,
PortFoundListener listener, Por... |
@Test public void find_rmi_clients() throws Exception { for (int ii = 0; ii < 4; ii++) { generate_port_spawn(30); ClientListener cl = new ClientListener(); ScanListener sl = new ScanListener(); int before[] = generate_random_ports(1, 6, m_pmin - 10, m_pmin - 1); int after[] = generate_random_ports(1, 6, m_pmax + 1, m_p... | public static <T> T find_rmi_client(String host, int port, Class<T> iface) { try { Client c = new Client(host, port); return iface.cast(c.lookup(iface)); } catch (Exception e) { } return null; } | RmiClientDiscovery { public static <T> T find_rmi_client(String host, int port, Class<T> iface) { try { Client c = new Client(host, port); return iface.cast(c.lookup(iface)); } catch (Exception e) { } return null; } } | RmiClientDiscovery { public static <T> T find_rmi_client(String host, int port, Class<T> iface) { try { Client c = new Client(host, port); return iface.cast(c.lookup(iface)); } catch (Exception e) { } return null; } } | RmiClientDiscovery { public static <T> T find_rmi_client(String host, int port, Class<T> iface) { try { Client c = new Client(host, port); return iface.cast(c.lookup(iface)); } catch (Exception e) { } return null; } static void find_open_ports(String host, int min_port, int max_port,
PortFoundListener listener, Por... | RmiClientDiscovery { public static <T> T find_rmi_client(String host, int port, Class<T> iface) { try { Client c = new Client(host, port); return iface.cast(c.lookup(iface)); } catch (Exception e) { } return null; } static void find_open_ports(String host, int min_port, int max_port,
PortFoundListener listener, Por... |
@Test public void building_cyclic_thread_group_hierarchies() throws Exception { WorkerThreadGroup wtg1 = new WorkerThreadGroup("g1"); WorkerThreadGroup wtg2 = new WorkerThreadGroup("g2"); WorkerThreadGroup wtg3 = new WorkerThreadGroup("g3"); wtg1.add_subgroup(wtg2); wtg2.add_subgroup(wtg3); boolean fail = false; try { ... | public synchronized void add_subgroup(WorkerThreadGroup wtg) { Ensure.not_null(wtg, "wtg == null"); Ensure.is_true(wtg != this, "wtg == this"); Ensure.is_false(m_subgroups.contains(wtg), "m_subgroups.contains(wtg)"); Ensure.is_false(wtg.all_subgroups().contains(this), "wtg.all_subgroups().contains(this)"); m_subgroups.... | WorkerThreadGroup implements WorkerThreadGroupCI { public synchronized void add_subgroup(WorkerThreadGroup wtg) { Ensure.not_null(wtg, "wtg == null"); Ensure.is_true(wtg != this, "wtg == this"); Ensure.is_false(m_subgroups.contains(wtg), "m_subgroups.contains(wtg)"); Ensure.is_false(wtg.all_subgroups().contains(this), ... | WorkerThreadGroup implements WorkerThreadGroupCI { public synchronized void add_subgroup(WorkerThreadGroup wtg) { Ensure.not_null(wtg, "wtg == null"); Ensure.is_true(wtg != this, "wtg == this"); Ensure.is_false(m_subgroups.contains(wtg), "m_subgroups.contains(wtg)"); Ensure.is_false(wtg.all_subgroups().contains(this), ... | WorkerThreadGroup implements WorkerThreadGroupCI { public synchronized void add_subgroup(WorkerThreadGroup wtg) { Ensure.not_null(wtg, "wtg == null"); Ensure.is_true(wtg != this, "wtg == this"); Ensure.is_false(m_subgroups.contains(wtg), "m_subgroups.contains(wtg)"); Ensure.is_false(wtg.all_subgroups().contains(this), ... | WorkerThreadGroup implements WorkerThreadGroupCI { public synchronized void add_subgroup(WorkerThreadGroup wtg) { Ensure.not_null(wtg, "wtg == null"); Ensure.is_true(wtg != this, "wtg == this"); Ensure.is_false(m_subgroups.contains(wtg), "m_subgroups.contains(wtg)"); Ensure.is_false(wtg.all_subgroups().contains(this), ... |
@Test(expected = AssertionError.class) public void stop_thread_before_starting() throws Exception { WorkerThread wt = new WorkerThread("x"); wt.stop(); } | @Override public final synchronized void stop() { Ensure.is_true(m_state == WtState.RUNNING, "w_state != WtState.RUNNING"); if (Thread.currentThread() == m_thread) { throw new ClosingWorkerThreadFromWithinException(); } m_state = WtState.STOPPING; fire_state_changed(); Thread t = m_thread; while (t.isAlive()) { try { i... | WorkerThread implements WorkerThreadCI { @Override public final synchronized void stop() { Ensure.is_true(m_state == WtState.RUNNING, "w_state != WtState.RUNNING"); if (Thread.currentThread() == m_thread) { throw new ClosingWorkerThreadFromWithinException(); } m_state = WtState.STOPPING; fire_state_changed(); Thread t ... | WorkerThread implements WorkerThreadCI { @Override public final synchronized void stop() { Ensure.is_true(m_state == WtState.RUNNING, "w_state != WtState.RUNNING"); if (Thread.currentThread() == m_thread) { throw new ClosingWorkerThreadFromWithinException(); } m_state = WtState.STOPPING; fire_state_changed(); Thread t ... | WorkerThread implements WorkerThreadCI { @Override public final synchronized void stop() { Ensure.is_true(m_state == WtState.RUNNING, "w_state != WtState.RUNNING"); if (Thread.currentThread() == m_thread) { throw new ClosingWorkerThreadFromWithinException(); } m_state = WtState.STOPPING; fire_state_changed(); Thread t ... | WorkerThread implements WorkerThreadCI { @Override public final synchronized void stop() { Ensure.is_true(m_state == WtState.RUNNING, "w_state != WtState.RUNNING"); if (Thread.currentThread() == m_thread) { throw new ClosingWorkerThreadFromWithinException(); } m_state = WtState.STOPPING; fire_state_changed(); Thread t ... |
@Test public void enumeration_checks() { WtState[] states = WtState.values(); for (WtState s : states) { WtState.valueOf(s.name()); } } | @Override public String name() { return m_name; } | WorkerThread implements WorkerThreadCI { @Override public String name() { return m_name; } } | WorkerThread implements WorkerThreadCI { @Override public String name() { return m_name; } WorkerThread(String name); } | WorkerThread implements WorkerThreadCI { @Override public String name() { return m_name; } WorkerThread(String name); void add_listener(WorkerThreadListener l); void remove_listener(WorkerThreadListener l); @Override String name(); @Override synchronized String description(); @Override synchronized ThrowableCollector c... | WorkerThread implements WorkerThreadCI { @Override public String name() { return m_name; } WorkerThread(String name); void add_listener(WorkerThreadListener l); void remove_listener(WorkerThreadListener l); @Override String name(); @Override synchronized String description(); @Override synchronized ThrowableCollector c... |
@Test public void testRootComponent() throws Exception { System.out.println("get/set RootComponent"); AcmeGraph instance = new AcmeGraph(dummyUI); String expResult = "ZNewsSys"; IAcmeSystem result = instance.getCurrentSystem(); assertNotNull(result); assertEquals(expResult, result.getName()); } | public IAcmeSystem getCurrentSystem() { return currentSystem; } | AcmeGraph extends AcmeModelView { public IAcmeSystem getCurrentSystem() { return currentSystem; } } | AcmeGraph extends AcmeModelView { public IAcmeSystem getCurrentSystem() { return currentSystem; } AcmeGraph(AbstractRainbowVaadinUI ui); } | AcmeGraph extends AcmeModelView { public IAcmeSystem getCurrentSystem() { return currentSystem; } AcmeGraph(AbstractRainbowVaadinUI ui); IAcmeSystem getCurrentSystem(); void setCurrentSystem(IAcmeSystem system); void resetGraph(); } | AcmeGraph extends AcmeModelView { public IAcmeSystem getCurrentSystem() { return currentSystem; } AcmeGraph(AbstractRainbowVaadinUI ui); IAcmeSystem getCurrentSystem(); void setCurrentSystem(IAcmeSystem system); void resetGraph(); } |
@SuppressWarnings("javadoc") @Test public void starting_after_closed() throws Exception { try ( PipedInputStream pis = new PipedInputStream(15); PipedOutputStream pos = new PipedOutputStream(pis); CloseableWorkerThread<PipedInputStream> cwt = new CloseableWorkerThread<PipedInputStream>("y", pis, false) { @Override prot... | @Override public synchronized void close() throws IOException { if (m_closeable == null) { return; } T t = m_closeable; m_closeable = null; if (state() == WtState.RUNNING) { thread().interrupt(); } try { t.close(); } finally { m_dispatcher.dispatch(new DispatcherOp<CloseableListener>() { @Override public void dispatch(... | CloseableWorkerThread extends WorkerThread implements Closeable { @Override public synchronized void close() throws IOException { if (m_closeable == null) { return; } T t = m_closeable; m_closeable = null; if (state() == WtState.RUNNING) { thread().interrupt(); } try { t.close(); } finally { m_dispatcher.dispatch(new D... | CloseableWorkerThread extends WorkerThread implements Closeable { @Override public synchronized void close() throws IOException { if (m_closeable == null) { return; } T t = m_closeable; m_closeable = null; if (state() == WtState.RUNNING) { thread().interrupt(); } try { t.close(); } finally { m_dispatcher.dispatch(new D... | CloseableWorkerThread extends WorkerThread implements Closeable { @Override public synchronized void close() throws IOException { if (m_closeable == null) { return; } T t = m_closeable; m_closeable = null; if (state() == WtState.RUNNING) { thread().interrupt(); } try { t.close(); } finally { m_dispatcher.dispatch(new D... | CloseableWorkerThread extends WorkerThread implements Closeable { @Override public synchronized void close() throws IOException { if (m_closeable == null) { return; } T t = m_closeable; m_closeable = null; if (state() == WtState.RUNNING) { thread().interrupt(); } try { t.close(); } finally { m_dispatcher.dispatch(new D... |
@SuppressWarnings("javadoc") @Test public void closing_all_in_a_group() throws Exception { WorkerThreadGroup wtg1 = new WorkerThreadGroup("g1"); WorkerThreadGroup wtg2 = new WorkerThreadGroup("g2"); wtg1.add_subgroup(wtg2); WorkerThread t1 = new WorkerThread("t1"); WorkerThread t2 = new WorkerThread("t1"); WorkerThread... | public synchronized boolean closed() { return m_closeable == null; } | CloseableWorkerThread extends WorkerThread implements Closeable { public synchronized boolean closed() { return m_closeable == null; } } | CloseableWorkerThread extends WorkerThread implements Closeable { public synchronized boolean closed() { return m_closeable == null; } CloseableWorkerThread(String name, T closeable,
boolean close_on_abort); } | CloseableWorkerThread extends WorkerThread implements Closeable { public synchronized boolean closed() { return m_closeable == null; } CloseableWorkerThread(String name, T closeable,
boolean close_on_abort); synchronized void add_listener(CloseableListener l); synchronized void remove_listener(CloseableListener l); ... | CloseableWorkerThread extends WorkerThread implements Closeable { public synchronized boolean closed() { return m_closeable == null; } CloseableWorkerThread(String name, T closeable,
boolean close_on_abort); synchronized void add_listener(CloseableListener l); synchronized void remove_listener(CloseableListener l); ... |
@Test public void readEmptyDirectory() throws Exception { TemporaryFile tf = new TemporaryFile(true); Set<File> f = DirectoryReader.listAllRecursively(tf.getFile()); assertEquals(0, f.size()); tf.delete(); } | public static Set<File> listAllRecursively(File directory) { Ensure.not_null(directory, "directory == null"); Ensure.is_true(directory.isDirectory(), "file is not a directory"); Set<File> result = new HashSet<>(); File[] files = directory.listFiles(); for (File f : files) { if (f.isDirectory()) { result.addAll(listAllR... | DirectoryReader { public static Set<File> listAllRecursively(File directory) { Ensure.not_null(directory, "directory == null"); Ensure.is_true(directory.isDirectory(), "file is not a directory"); Set<File> result = new HashSet<>(); File[] files = directory.listFiles(); for (File f : files) { if (f.isDirectory()) { resu... | DirectoryReader { public static Set<File> listAllRecursively(File directory) { Ensure.not_null(directory, "directory == null"); Ensure.is_true(directory.isDirectory(), "file is not a directory"); Set<File> result = new HashSet<>(); File[] files = directory.listFiles(); for (File f : files) { if (f.isDirectory()) { resu... | DirectoryReader { public static Set<File> listAllRecursively(File directory) { Ensure.not_null(directory, "directory == null"); Ensure.is_true(directory.isDirectory(), "file is not a directory"); Set<File> result = new HashSet<>(); File[] files = directory.listFiles(); for (File f : files) { if (f.isDirectory()) { resu... | DirectoryReader { public static Set<File> listAllRecursively(File directory) { Ensure.not_null(directory, "directory == null"); Ensure.is_true(directory.isDirectory(), "file is not a directory"); Set<File> result = new HashSet<>(); File[] files = directory.listFiles(); for (File f : files) { if (f.isDirectory()) { resu... |
@Test public void readDirectoryWithFiles() throws Exception { TemporaryFile tf = new TemporaryFile(true); File f1 = new File(tf.getFile(), "x"); FileContentWorker.set_contents(f1, "x"); File f2 = new File(tf.getFile(), "y"); FileContentWorker.set_contents(f2, "y"); Set<File> f = DirectoryReader.listAllRecursively(tf.ge... | public static Set<File> listAllRecursively(File directory) { Ensure.not_null(directory, "directory == null"); Ensure.is_true(directory.isDirectory(), "file is not a directory"); Set<File> result = new HashSet<>(); File[] files = directory.listFiles(); for (File f : files) { if (f.isDirectory()) { result.addAll(listAllR... | DirectoryReader { public static Set<File> listAllRecursively(File directory) { Ensure.not_null(directory, "directory == null"); Ensure.is_true(directory.isDirectory(), "file is not a directory"); Set<File> result = new HashSet<>(); File[] files = directory.listFiles(); for (File f : files) { if (f.isDirectory()) { resu... | DirectoryReader { public static Set<File> listAllRecursively(File directory) { Ensure.not_null(directory, "directory == null"); Ensure.is_true(directory.isDirectory(), "file is not a directory"); Set<File> result = new HashSet<>(); File[] files = directory.listFiles(); for (File f : files) { if (f.isDirectory()) { resu... | DirectoryReader { public static Set<File> listAllRecursively(File directory) { Ensure.not_null(directory, "directory == null"); Ensure.is_true(directory.isDirectory(), "file is not a directory"); Set<File> result = new HashSet<>(); File[] files = directory.listFiles(); for (File f : files) { if (f.isDirectory()) { resu... | DirectoryReader { public static Set<File> listAllRecursively(File directory) { Ensure.not_null(directory, "directory == null"); Ensure.is_true(directory.isDirectory(), "file is not a directory"); Set<File> result = new HashSet<>(); File[] files = directory.listFiles(); for (File f : files) { if (f.isDirectory()) { resu... |
@Test public void readDirectoryWithSubdirectory() throws Exception { TemporaryFile tf = new TemporaryFile(true); File f1 = new File(tf.getFile(), "x"); FileContentWorker.set_contents(f1, "x"); File d = new File(tf.getFile(), "z"); d.mkdir(); File f2 = new File(d, "y"); FileContentWorker.set_contents(f2, "y"); Set<File>... | public static Set<File> listAllRecursively(File directory) { Ensure.not_null(directory, "directory == null"); Ensure.is_true(directory.isDirectory(), "file is not a directory"); Set<File> result = new HashSet<>(); File[] files = directory.listFiles(); for (File f : files) { if (f.isDirectory()) { result.addAll(listAllR... | DirectoryReader { public static Set<File> listAllRecursively(File directory) { Ensure.not_null(directory, "directory == null"); Ensure.is_true(directory.isDirectory(), "file is not a directory"); Set<File> result = new HashSet<>(); File[] files = directory.listFiles(); for (File f : files) { if (f.isDirectory()) { resu... | DirectoryReader { public static Set<File> listAllRecursively(File directory) { Ensure.not_null(directory, "directory == null"); Ensure.is_true(directory.isDirectory(), "file is not a directory"); Set<File> result = new HashSet<>(); File[] files = directory.listFiles(); for (File f : files) { if (f.isDirectory()) { resu... | DirectoryReader { public static Set<File> listAllRecursively(File directory) { Ensure.not_null(directory, "directory == null"); Ensure.is_true(directory.isDirectory(), "file is not a directory"); Set<File> result = new HashSet<>(); File[] files = directory.listFiles(); for (File f : files) { if (f.isDirectory()) { resu... | DirectoryReader { public static Set<File> listAllRecursively(File directory) { Ensure.not_null(directory, "directory == null"); Ensure.is_true(directory.isDirectory(), "file is not a directory"); Set<File> result = new HashSet<>(); File[] files = directory.listFiles(); for (File f : files) { if (f.isDirectory()) { resu... |
@Test public void create_operation() throws Exception { DataValue v = m_oi.create_operation("test"); assertEquals("test", m_oi.operation_name(v)); assertEquals(0, m_oi.parameters(v).size()); } | public DataValue create_operation(String name) { Ensure.not_null(name); Map<Field, DataValue> values = new HashMap<>(); values.put(m_operation_name_field, m_pscope.string().make(name)); values.put(m_operation_parameters_field, SetDataType.set_of(m_parameter_type, m_pscope).make()); return m_operation_type.make(values);... | OperationInformation { public DataValue create_operation(String name) { Ensure.not_null(name); Map<Field, DataValue> values = new HashMap<>(); values.put(m_operation_name_field, m_pscope.string().make(name)); values.put(m_operation_parameters_field, SetDataType.set_of(m_parameter_type, m_pscope).make()); return m_opera... | OperationInformation { public DataValue create_operation(String name) { Ensure.not_null(name); Map<Field, DataValue> values = new HashMap<>(); values.put(m_operation_name_field, m_pscope.string().make(name)); values.put(m_operation_parameters_field, SetDataType.set_of(m_parameter_type, m_pscope).make()); return m_opera... | OperationInformation { public DataValue create_operation(String name) { Ensure.not_null(name); Map<Field, DataValue> values = new HashMap<>(); values.put(m_operation_name_field, m_pscope.string().make(name)); values.put(m_operation_parameters_field, SetDataType.set_of(m_parameter_type, m_pscope).make()); return m_opera... | OperationInformation { public DataValue create_operation(String name) { Ensure.not_null(name); Map<Field, DataValue> values = new HashMap<>(); values.put(m_operation_name_field, m_pscope.string().make(name)); values.put(m_operation_parameters_field, SetDataType.set_of(m_parameter_type, m_pscope).make()); return m_opera... |
@Test public void check_is_operation_on_non_operation() throws Exception { assertFalse(m_oi.is_operation(m_pscope.int32().make(2))); } | public boolean is_operation(DataValue op_v) { Ensure.not_null(op_v); return m_operation_type.is_instance(op_v); } | OperationInformation { public boolean is_operation(DataValue op_v) { Ensure.not_null(op_v); return m_operation_type.is_instance(op_v); } } | OperationInformation { public boolean is_operation(DataValue op_v) { Ensure.not_null(op_v); return m_operation_type.is_instance(op_v); } OperationInformation(PrimitiveScope pscope); } | OperationInformation { public boolean is_operation(DataValue op_v) { Ensure.not_null(op_v); return m_operation_type.is_instance(op_v); } OperationInformation(PrimitiveScope pscope); DataValue create_operation(String name); boolean is_operation(DataValue op_v); String operation_name(DataValue op_v); void add_parameter(D... | OperationInformation { public boolean is_operation(DataValue op_v) { Ensure.not_null(op_v); return m_operation_type.is_instance(op_v); } OperationInformation(PrimitiveScope pscope); DataValue create_operation(String name); boolean is_operation(DataValue op_v); String operation_name(DataValue op_v); void add_parameter(D... |
@Test public void add_operation_to_group() throws Exception { DataValue g = m_oi.create_group(); DataValue op = m_oi.create_operation("foo"); m_oi.add_operation_to_group(g, op); assertEquals(1, m_oi.group_operation_names(g).size()); assertTrue(m_oi.group_operation_names(g).contains("foo")); DataValue op_2 = m_oi.group_... | public void add_operation_to_group(DataValue group_v, DataValue op_v) { Ensure.is_true(is_group(group_v)); Ensure.is_true(is_operation(op_v)); Ensure.is_false(group_has_operation(group_v, operation_name(op_v))); StructureDataValue group = (StructureDataValue) group_v; MapDataValue ops = (MapDataValue) group.value( m_gr... | OperationInformation { public void add_operation_to_group(DataValue group_v, DataValue op_v) { Ensure.is_true(is_group(group_v)); Ensure.is_true(is_operation(op_v)); Ensure.is_false(group_has_operation(group_v, operation_name(op_v))); StructureDataValue group = (StructureDataValue) group_v; MapDataValue ops = (MapDataV... | OperationInformation { public void add_operation_to_group(DataValue group_v, DataValue op_v) { Ensure.is_true(is_group(group_v)); Ensure.is_true(is_operation(op_v)); Ensure.is_false(group_has_operation(group_v, operation_name(op_v))); StructureDataValue group = (StructureDataValue) group_v; MapDataValue ops = (MapDataV... | OperationInformation { public void add_operation_to_group(DataValue group_v, DataValue op_v) { Ensure.is_true(is_group(group_v)); Ensure.is_true(is_operation(op_v)); Ensure.is_false(group_has_operation(group_v, operation_name(op_v))); StructureDataValue group = (StructureDataValue) group_v; MapDataValue ops = (MapDataV... | OperationInformation { public void add_operation_to_group(DataValue group_v, DataValue op_v) { Ensure.is_true(is_group(group_v)); Ensure.is_true(is_operation(op_v)); Ensure.is_false(group_has_operation(group_v, operation_name(op_v))); StructureDataValue group = (StructureDataValue) group_v; MapDataValue ops = (MapDataV... |
@Test public void create_execution_request() throws Exception { DataValue op = m_oi.create_operation("foo"); m_oi.add_parameter(op, m_pscope.int32(), "foo", ParameterDirection.INPUT); Map<String, DataValue> iargs = new HashMap<>(); iargs.put("foo", m_pscope.int32().make(-6)); DataValue er = m_oi.create_execution_reques... | public DataValue create_execution_request(long exec_id, String dst_id, String obj_id, DataValue op_v, Map<String, DataValue> input_arguments) { Ensure.not_null(dst_id, "dst_id == null"); Ensure.not_null(obj_id, "obj_id == null"); Ensure.is_true(is_operation(op_v), "op_v is not an operation"); Ensure.not_null(input_argu... | OperationInformation { public DataValue create_execution_request(long exec_id, String dst_id, String obj_id, DataValue op_v, Map<String, DataValue> input_arguments) { Ensure.not_null(dst_id, "dst_id == null"); Ensure.not_null(obj_id, "obj_id == null"); Ensure.is_true(is_operation(op_v), "op_v is not an operation"); Ens... | OperationInformation { public DataValue create_execution_request(long exec_id, String dst_id, String obj_id, DataValue op_v, Map<String, DataValue> input_arguments) { Ensure.not_null(dst_id, "dst_id == null"); Ensure.not_null(obj_id, "obj_id == null"); Ensure.is_true(is_operation(op_v), "op_v is not an operation"); Ens... | OperationInformation { public DataValue create_execution_request(long exec_id, String dst_id, String obj_id, DataValue op_v, Map<String, DataValue> input_arguments) { Ensure.not_null(dst_id, "dst_id == null"); Ensure.not_null(obj_id, "obj_id == null"); Ensure.is_true(is_operation(op_v), "op_v is not an operation"); Ens... | OperationInformation { public DataValue create_execution_request(long exec_id, String dst_id, String obj_id, DataValue op_v, Map<String, DataValue> input_arguments) { Ensure.not_null(dst_id, "dst_id == null"); Ensure.not_null(obj_id, "obj_id == null"); Ensure.is_true(is_operation(op_v), "op_v is not an operation"); Ens... |
@Test public void forwarding_with_sink_set() throws Exception { m_filter.connect(m_sink); m_filter.m_forward = true; BusData d = bus_data(); m_filter.sink(d); assertEquals(1, m_sink.m_data.size()); assertSame(d, m_sink.m_data.get(0)); } | public synchronized void connect(EventSink s) { Ensure.is_true(m_sink == null || s == null); Ensure.is_null(m_lock); m_sink = s; } | EventFilter implements EventSink { public synchronized void connect(EventSink s) { Ensure.is_true(m_sink == null || s == null); Ensure.is_null(m_lock); m_sink = s; } } | EventFilter implements EventSink { public synchronized void connect(EventSink s) { Ensure.is_true(m_sink == null || s == null); Ensure.is_null(m_lock); m_sink = s; } EventFilter(); } | EventFilter implements EventSink { public synchronized void connect(EventSink s) { Ensure.is_true(m_sink == null || s == null); Ensure.is_null(m_lock); m_sink = s; } EventFilter(); synchronized void connect(EventSink s); synchronized EventSink connected(); EventFilterInfo info(); synchronized void lock(Object l); synch... | EventFilter implements EventSink { public synchronized void connect(EventSink s) { Ensure.is_true(m_sink == null || s == null); Ensure.is_null(m_lock); m_sink = s; } EventFilter(); synchronized void connect(EventSink s); synchronized EventSink connected(); EventFilterInfo info(); synchronized void lock(Object l); synch... |
@Test public void testUpdate() throws IllegalStateException, AcmeException { System.out.println("update"); AcmeModelView instance = new AcmeModelViewImpl(svp); int expResult = 0; int result = ((AcmeModelViewImpl) instance).updateCnt; assertEquals(expResult, result); expResult = 1; instance.update(); result = ((AcmeMode... | @Override public void update() { model = (IAcmeSystem) systemViewProvider.getView().getModelInstance(); if (isModelChanged()) { subUpdate(); } } | AcmeModelView extends CustomComponent implements IUpdatableWidget { @Override public void update() { model = (IAcmeSystem) systemViewProvider.getView().getModelInstance(); if (isModelChanged()) { subUpdate(); } } } | AcmeModelView extends CustomComponent implements IUpdatableWidget { @Override public void update() { model = (IAcmeSystem) systemViewProvider.getView().getModelInstance(); if (isModelChanged()) { subUpdate(); } } AcmeModelView(ISystemViewProvider svp); } | AcmeModelView extends CustomComponent implements IUpdatableWidget { @Override public void update() { model = (IAcmeSystem) systemViewProvider.getView().getModelInstance(); if (isModelChanged()) { subUpdate(); } } AcmeModelView(ISystemViewProvider svp); @Override void update(); @Override boolean isActive(); @Override vo... | AcmeModelView extends CustomComponent implements IUpdatableWidget { @Override public void update() { model = (IAcmeSystem) systemViewProvider.getView().getModelInstance(); if (isModelChanged()) { subUpdate(); } } AcmeModelView(ISystemViewProvider svp); @Override void update(); @Override boolean isActive(); @Override vo... |
@Test(expected = AssertionError.class) public void setting_sink_with_sink_already_set() throws Exception { m_filter.connect(m_sink); m_filter.connect(m_sink); } | public synchronized void connect(EventSink s) { Ensure.is_true(m_sink == null || s == null); Ensure.is_null(m_lock); m_sink = s; } | EventFilter implements EventSink { public synchronized void connect(EventSink s) { Ensure.is_true(m_sink == null || s == null); Ensure.is_null(m_lock); m_sink = s; } } | EventFilter implements EventSink { public synchronized void connect(EventSink s) { Ensure.is_true(m_sink == null || s == null); Ensure.is_null(m_lock); m_sink = s; } EventFilter(); } | EventFilter implements EventSink { public synchronized void connect(EventSink s) { Ensure.is_true(m_sink == null || s == null); Ensure.is_null(m_lock); m_sink = s; } EventFilter(); synchronized void connect(EventSink s); synchronized EventSink connected(); EventFilterInfo info(); synchronized void lock(Object l); synch... | EventFilter implements EventSink { public synchronized void connect(EventSink s) { Ensure.is_true(m_sink == null || s == null); Ensure.is_null(m_lock); m_sink = s; } EventFilter(); synchronized void connect(EventSink s); synchronized EventSink connected(); EventFilterInfo info(); synchronized void lock(Object l); synch... |
@Test public void resetting_sink_legally() throws Exception { m_filter.connect(m_sink); m_filter.connect(null); m_filter.connect(null); m_filter.connect(m_sink); } | public synchronized void connect(EventSink s) { Ensure.is_true(m_sink == null || s == null); Ensure.is_null(m_lock); m_sink = s; } | EventFilter implements EventSink { public synchronized void connect(EventSink s) { Ensure.is_true(m_sink == null || s == null); Ensure.is_null(m_lock); m_sink = s; } } | EventFilter implements EventSink { public synchronized void connect(EventSink s) { Ensure.is_true(m_sink == null || s == null); Ensure.is_null(m_lock); m_sink = s; } EventFilter(); } | EventFilter implements EventSink { public synchronized void connect(EventSink s) { Ensure.is_true(m_sink == null || s == null); Ensure.is_null(m_lock); m_sink = s; } EventFilter(); synchronized void connect(EventSink s); synchronized EventSink connected(); EventFilterInfo info(); synchronized void lock(Object l); synch... | EventFilter implements EventSink { public synchronized void connect(EventSink s) { Ensure.is_true(m_sink == null || s == null); Ensure.is_null(m_lock); m_sink = s; } EventFilter(); synchronized void connect(EventSink s); synchronized EventSink connected(); EventFilterInfo info(); synchronized void lock(Object l); synch... |
@Test public void obtaining_filter_information() throws Exception { EventFilterInfo i = m_filter.info(); assertEquals(TestEventFilter.class.getName(), i.filter_class()); } | public EventFilterInfo info() { return new EventFilterInfo(this); } | EventFilter implements EventSink { public EventFilterInfo info() { return new EventFilterInfo(this); } } | EventFilter implements EventSink { public EventFilterInfo info() { return new EventFilterInfo(this); } EventFilter(); } | EventFilter implements EventSink { public EventFilterInfo info() { return new EventFilterInfo(this); } EventFilter(); synchronized void connect(EventSink s); synchronized EventSink connected(); EventFilterInfo info(); synchronized void lock(Object l); synchronized void unlock(Object l); synchronized boolean locked(); } | EventFilter implements EventSink { public EventFilterInfo info() { return new EventFilterInfo(this); } EventFilter(); synchronized void connect(EventSink s); synchronized EventSink connected(); EventFilterInfo info(); synchronized void lock(Object l); synchronized void unlock(Object l); synchronized boolean locked(); ... |
@Test(expected = AssertionError.class) public void event_filter_forward_null() throws Exception { m_filter.forward(null); } | protected void forward(BusData data) throws IOException { Ensure.not_null(data); EventSink sink; synchronized (this) { sink = m_sink; } if (sink != null) { sink.sink(data); } } | EventFilter implements EventSink { protected void forward(BusData data) throws IOException { Ensure.not_null(data); EventSink sink; synchronized (this) { sink = m_sink; } if (sink != null) { sink.sink(data); } } } | EventFilter implements EventSink { protected void forward(BusData data) throws IOException { Ensure.not_null(data); EventSink sink; synchronized (this) { sink = m_sink; } if (sink != null) { sink.sink(data); } } EventFilter(); } | EventFilter implements EventSink { protected void forward(BusData data) throws IOException { Ensure.not_null(data); EventSink sink; synchronized (this) { sink = m_sink; } if (sink != null) { sink.sink(data); } } EventFilter(); synchronized void connect(EventSink s); synchronized EventSink connected(); EventFilterInfo i... | EventFilter implements EventSink { protected void forward(BusData data) throws IOException { Ensure.not_null(data); EventSink sink; synchronized (this) { sink = m_sink; } if (sink != null) { sink.sink(data); } } EventFilter(); synchronized void connect(EventSink s); synchronized EventSink connected(); EventFilterInfo i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.