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 testReverseOne() { List<Integer> numbers = new ArrayList<Integer>(1); numbers.add(9); List<Integer> reversedNumbers = RestHelper.reverse(numbers); assertEquals(1, reversedNumbers.size()); assertEquals((Integer) 9, (Integer) reversedNumbers.get(0)); } | public static final <T> List<T> reverse(final List<T> strings) { final LinkedList<T> result = new LinkedList<T>(); for (final T s : strings) { result.addFirst(s); } return Collections.unmodifiableList(result); } | RestHelper { public static final <T> List<T> reverse(final List<T> strings) { final LinkedList<T> result = new LinkedList<T>(); for (final T s : strings) { result.addFirst(s); } return Collections.unmodifiableList(result); } } | RestHelper { public static final <T> List<T> reverse(final List<T> strings) { final LinkedList<T> result = new LinkedList<T>(); for (final T s : strings) { result.addFirst(s); } return Collections.unmodifiableList(result); } } | RestHelper { public static final <T> List<T> reverse(final List<T> strings) { final LinkedList<T> result = new LinkedList<T>(); for (final T s : strings) { result.addFirst(s); } return Collections.unmodifiableList(result); } static final List<Param> computeRequestTemplateParams(final Resource resource,
fin... | RestHelper { public static final <T> List<T> reverse(final List<T> strings) { final LinkedList<T> result = new LinkedList<T>(); for (final T s : strings) { result.addFirst(s); } return Collections.unmodifiableList(result); } static final List<Param> computeRequestTemplateParams(final Resource resource,
fin... |
@Test public void testGetResourceType() { assertEquals(RESOURCE_TYPE, link.getResourceType()); } | public String getResourceType() { return resourceType; } | Link extends WadlElement { public String getResourceType() { return resourceType; } } | Link extends WadlElement { public String getResourceType() { return resourceType; } Link(final String resourceType, final String rel, final String rev, final List<Documentation> doc); } | Link extends WadlElement { public String getResourceType() { return resourceType; } Link(final String resourceType, final String rel, final String rev, final List<Documentation> doc); String getResourceType(); String getRel(); String getRev(); } | Link extends WadlElement { public String getResourceType() { return resourceType; } Link(final String resourceType, final String rel, final String rev, final List<Documentation> doc); String getResourceType(); String getRel(); String getRev(); } |
@Test public void testGetRelType() { assertEquals(REL, link.getRel()); } | public String getRel() { return rel; } | Link extends WadlElement { public String getRel() { return rel; } } | Link extends WadlElement { public String getRel() { return rel; } Link(final String resourceType, final String rel, final String rev, final List<Documentation> doc); } | Link extends WadlElement { public String getRel() { return rel; } Link(final String resourceType, final String rel, final String rev, final List<Documentation> doc); String getResourceType(); String getRel(); String getRev(); } | Link extends WadlElement { public String getRel() { return rel; } Link(final String resourceType, final String rel, final String rev, final List<Documentation> doc); String getResourceType(); String getRel(); String getRev(); } |
@Test public void testPurgeDisableDeltas() throws Exception { Mockito.when(batchJobDAO.getDuplicateDetectionMode(jobId)).thenReturn(RecordHash.RECORD_HASH_MODE_DISABLE); Exchange exchange = new DefaultExchange(new DefaultCamelContext()); WorkNote workNote = new WorkNote(jobId, false); exchange.getIn().setBody(workNote)... | public boolean isEligibleForDeltaPurge(Exchange exchange) { WorkNote workNote = exchange.getIn().getBody(WorkNote.class); String jobId = workNote.getBatchJobId(); String deltaMode = batchJobDAO.getDuplicateDetectionMode(jobId); if(deltaMode != null && isDeltaPurgeMode(deltaMode)) { return true; } return false; } | BatchJobManager { public boolean isEligibleForDeltaPurge(Exchange exchange) { WorkNote workNote = exchange.getIn().getBody(WorkNote.class); String jobId = workNote.getBatchJobId(); String deltaMode = batchJobDAO.getDuplicateDetectionMode(jobId); if(deltaMode != null && isDeltaPurgeMode(deltaMode)) { return true; } retu... | BatchJobManager { public boolean isEligibleForDeltaPurge(Exchange exchange) { WorkNote workNote = exchange.getIn().getBody(WorkNote.class); String jobId = workNote.getBatchJobId(); String deltaMode = batchJobDAO.getDuplicateDetectionMode(jobId); if(deltaMode != null && isDeltaPurgeMode(deltaMode)) { return true; } retu... | BatchJobManager { public boolean isEligibleForDeltaPurge(Exchange exchange) { WorkNote workNote = exchange.getIn().getBody(WorkNote.class); String jobId = workNote.getBatchJobId(); String deltaMode = batchJobDAO.getDuplicateDetectionMode(jobId); if(deltaMode != null && isDeltaPurgeMode(deltaMode)) { return true; } retu... | BatchJobManager { public boolean isEligibleForDeltaPurge(Exchange exchange) { WorkNote workNote = exchange.getIn().getBody(WorkNote.class); String jobId = workNote.getBatchJobId(); String deltaMode = batchJobDAO.getDuplicateDetectionMode(jobId); if(deltaMode != null && isDeltaPurgeMode(deltaMode)) { return true; } retu... |
@Test public void testGetRev() { assertEquals(REV, link.getRev()); } | public String getRev() { return rev; } | Link extends WadlElement { public String getRev() { return rev; } } | Link extends WadlElement { public String getRev() { return rev; } Link(final String resourceType, final String rel, final String rev, final List<Documentation> doc); } | Link extends WadlElement { public String getRev() { return rev; } Link(final String resourceType, final String rel, final String rev, final List<Documentation> doc); String getResourceType(); String getRel(); String getRev(); } | Link extends WadlElement { public String getRev() { return rev; } Link(final String resourceType, final String rel, final String rev, final List<Documentation> doc); String getResourceType(); String getRel(); String getRev(); } |
@Test public void testGetId() { assertEquals(ID, resource.getId()); } | public String getId() { return id; } | Resource extends WadlElement { public String getId() { return id; } } | Resource extends WadlElement { public String getId() { return id; } Resource(final String id, final List<String> type, final String queryType, final String path,
final List<Documentation> doc, final List<Param> params, final List<Method> methods,
final List<Resource> resources, final String reso... | Resource extends WadlElement { public String getId() { return id; } Resource(final String id, final List<String> type, final String queryType, final String path,
final List<Documentation> doc, final List<Param> params, final List<Method> methods,
final List<Resource> resources, final String reso... | Resource extends WadlElement { public String getId() { return id; } Resource(final String id, final List<String> type, final String queryType, final String path,
final List<Documentation> doc, final List<Param> params, final List<Method> methods,
final List<Resource> resources, final String reso... |
@Test public void testGetMethods() { assertEquals(METHODS, resource.getMethods()); } | public List<Method> getMethods() { return methods; } | Resource extends WadlElement { public List<Method> getMethods() { return methods; } } | Resource extends WadlElement { public List<Method> getMethods() { return methods; } Resource(final String id, final List<String> type, final String queryType, final String path,
final List<Documentation> doc, final List<Param> params, final List<Method> methods,
final List<Resource> resources, f... | Resource extends WadlElement { public List<Method> getMethods() { return methods; } Resource(final String id, final List<String> type, final String queryType, final String path,
final List<Documentation> doc, final List<Param> params, final List<Method> methods,
final List<Resource> resources, f... | Resource extends WadlElement { public List<Method> getMethods() { return methods; } Resource(final String id, final List<String> type, final String queryType, final String path,
final List<Documentation> doc, final List<Param> params, final List<Method> methods,
final List<Resource> resources, f... |
@Test public void testGetParams() { assertEquals(PARAMS, resource.getParams()); } | public List<Param> getParams() { return params; } | Resource extends WadlElement { public List<Param> getParams() { return params; } } | Resource extends WadlElement { public List<Param> getParams() { return params; } Resource(final String id, final List<String> type, final String queryType, final String path,
final List<Documentation> doc, final List<Param> params, final List<Method> methods,
final List<Resource> resources, fina... | Resource extends WadlElement { public List<Param> getParams() { return params; } Resource(final String id, final List<String> type, final String queryType, final String path,
final List<Documentation> doc, final List<Param> params, final List<Method> methods,
final List<Resource> resources, fina... | Resource extends WadlElement { public List<Param> getParams() { return params; } Resource(final String id, final List<String> type, final String queryType, final String path,
final List<Documentation> doc, final List<Param> params, final List<Method> methods,
final List<Resource> resources, fina... |
@Test public void testGetPath() { assertEquals(PATH, resource.getPath()); } | public String getPath() { return path; } | Resource extends WadlElement { public String getPath() { return path; } } | Resource extends WadlElement { public String getPath() { return path; } Resource(final String id, final List<String> type, final String queryType, final String path,
final List<Documentation> doc, final List<Param> params, final List<Method> methods,
final List<Resource> resources, final String ... | Resource extends WadlElement { public String getPath() { return path; } Resource(final String id, final List<String> type, final String queryType, final String path,
final List<Documentation> doc, final List<Param> params, final List<Method> methods,
final List<Resource> resources, final String ... | Resource extends WadlElement { public String getPath() { return path; } Resource(final String id, final List<String> type, final String queryType, final String path,
final List<Documentation> doc, final List<Param> params, final List<Method> methods,
final List<Resource> resources, final String ... |
@Test public void testGetQueryType() { assertEquals(QUERY_TYPE, resource.getQueryType()); } | public String getQueryType() { return queryType; } | Resource extends WadlElement { public String getQueryType() { return queryType; } } | Resource extends WadlElement { public String getQueryType() { return queryType; } Resource(final String id, final List<String> type, final String queryType, final String path,
final List<Documentation> doc, final List<Param> params, final List<Method> methods,
final List<Resource> resources, fin... | Resource extends WadlElement { public String getQueryType() { return queryType; } Resource(final String id, final List<String> type, final String queryType, final String path,
final List<Documentation> doc, final List<Param> params, final List<Method> methods,
final List<Resource> resources, fin... | Resource extends WadlElement { public String getQueryType() { return queryType; } Resource(final String id, final List<String> type, final String queryType, final String path,
final List<Documentation> doc, final List<Param> params, final List<Method> methods,
final List<Resource> resources, fin... |
@Test public void testGetResources() { assertEquals(RESOURCES, resource.getResources()); } | public List<Resource> getResources() { return resources; } | Resource extends WadlElement { public List<Resource> getResources() { return resources; } } | Resource extends WadlElement { public List<Resource> getResources() { return resources; } Resource(final String id, final List<String> type, final String queryType, final String path,
final List<Documentation> doc, final List<Param> params, final List<Method> methods,
final List<Resource> resour... | Resource extends WadlElement { public List<Resource> getResources() { return resources; } Resource(final String id, final List<String> type, final String queryType, final String path,
final List<Documentation> doc, final List<Param> params, final List<Method> methods,
final List<Resource> resour... | Resource extends WadlElement { public List<Resource> getResources() { return resources; } Resource(final String id, final List<String> type, final String queryType, final String path,
final List<Documentation> doc, final List<Param> params, final List<Method> methods,
final List<Resource> resour... |
@Test public void testGetType() { assertEquals(TYPE, resource.getType()); } | public List<String> getType() { return type; } | Resource extends WadlElement { public List<String> getType() { return type; } } | Resource extends WadlElement { public List<String> getType() { return type; } Resource(final String id, final List<String> type, final String queryType, final String path,
final List<Documentation> doc, final List<Param> params, final List<Method> methods,
final List<Resource> resources, final S... | Resource extends WadlElement { public List<String> getType() { return type; } Resource(final String id, final List<String> type, final String queryType, final String path,
final List<Documentation> doc, final List<Param> params, final List<Method> methods,
final List<Resource> resources, final S... | Resource extends WadlElement { public List<String> getType() { return type; } Resource(final String id, final List<String> type, final String queryType, final String path,
final List<Documentation> doc, final List<Param> params, final List<Method> methods,
final List<Resource> resources, final S... |
@Test public void testToString() { assertTrue(!"".equals(resource.toString())); } | @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("id").append(" : ").append(id); sb.append(", "); sb.append("type").append(" : ").append(type); sb.append(", "); sb.append("queryType").append(" : ").append(queryType); sb.append(", "); sb.append("path").append("... | Resource extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("id").append(" : ").append(id); sb.append(", "); sb.append("type").append(" : ").append(type); sb.append(", "); sb.append("queryType").append(" : ").append(queryType); sb.append(",... | Resource extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("id").append(" : ").append(id); sb.append(", "); sb.append("type").append(" : ").append(type); sb.append(", "); sb.append("queryType").append(" : ").append(queryType); sb.append(",... | Resource extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("id").append(" : ").append(id); sb.append(", "); sb.append("type").append(" : ").append(type); sb.append(", "); sb.append("queryType").append(" : ").append(queryType); sb.append(",... | Resource extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("id").append(" : ").append(id); sb.append(", "); sb.append("type").append(" : ").append(type); sb.append(", "); sb.append("queryType").append(" : ").append(queryType); sb.append(",... |
@Test public void testGetName() { assertEquals(NAME, param.getName()); } | public String getName() { return name; } | Param extends WadlElement { public String getName() { return name; } } | Param extends WadlElement { public String getName() { return name; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Documentation> do... | Param extends WadlElement { public String getName() { return name; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Documentation> do... | Param extends WadlElement { public String getName() { return name; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Documentation> do... |
@Test public void testPurgeResetDeltas() throws Exception { Mockito.when(batchJobDAO.getDuplicateDetectionMode(jobId)).thenReturn(RecordHash.RECORD_HASH_MODE_RESET); Exchange exchange = new DefaultExchange(new DefaultCamelContext()); WorkNote workNote = new WorkNote(jobId, false); exchange.getIn().setBody(workNote); bo... | public boolean isEligibleForDeltaPurge(Exchange exchange) { WorkNote workNote = exchange.getIn().getBody(WorkNote.class); String jobId = workNote.getBatchJobId(); String deltaMode = batchJobDAO.getDuplicateDetectionMode(jobId); if(deltaMode != null && isDeltaPurgeMode(deltaMode)) { return true; } return false; } | BatchJobManager { public boolean isEligibleForDeltaPurge(Exchange exchange) { WorkNote workNote = exchange.getIn().getBody(WorkNote.class); String jobId = workNote.getBatchJobId(); String deltaMode = batchJobDAO.getDuplicateDetectionMode(jobId); if(deltaMode != null && isDeltaPurgeMode(deltaMode)) { return true; } retu... | BatchJobManager { public boolean isEligibleForDeltaPurge(Exchange exchange) { WorkNote workNote = exchange.getIn().getBody(WorkNote.class); String jobId = workNote.getBatchJobId(); String deltaMode = batchJobDAO.getDuplicateDetectionMode(jobId); if(deltaMode != null && isDeltaPurgeMode(deltaMode)) { return true; } retu... | BatchJobManager { public boolean isEligibleForDeltaPurge(Exchange exchange) { WorkNote workNote = exchange.getIn().getBody(WorkNote.class); String jobId = workNote.getBatchJobId(); String deltaMode = batchJobDAO.getDuplicateDetectionMode(jobId); if(deltaMode != null && isDeltaPurgeMode(deltaMode)) { return true; } retu... | BatchJobManager { public boolean isEligibleForDeltaPurge(Exchange exchange) { WorkNote workNote = exchange.getIn().getBody(WorkNote.class); String jobId = workNote.getBatchJobId(); String deltaMode = batchJobDAO.getDuplicateDetectionMode(jobId); if(deltaMode != null && isDeltaPurgeMode(deltaMode)) { return true; } retu... |
@Test public void parseProperties() throws ParseException, MissingConfigException { String[] args = new String[] { "-u", "user", "-pass", "password", "-s", "server", "-d", "localDir", "-port", "22" }; UploadProperties props = propUtils.getUploadProperties(args); Assert.assertNotNull("UploadProperties should not be null... | public UploadProperties getUploadProperties(String[] args) throws ParseException, MissingConfigException { CommandLine cmd = parser.parse(OPTIONS, args); String user = cmd.getOptionValue(FLAG_USER); if (user == null) { throw new MissingConfigException(FLAG_USER); } String password = cmd.getOptionValue(FLAG_PASSWORD); i... | PropertyUtils { public UploadProperties getUploadProperties(String[] args) throws ParseException, MissingConfigException { CommandLine cmd = parser.parse(OPTIONS, args); String user = cmd.getOptionValue(FLAG_USER); if (user == null) { throw new MissingConfigException(FLAG_USER); } String password = cmd.getOptionValue(F... | PropertyUtils { public UploadProperties getUploadProperties(String[] args) throws ParseException, MissingConfigException { CommandLine cmd = parser.parse(OPTIONS, args); String user = cmd.getOptionValue(FLAG_USER); if (user == null) { throw new MissingConfigException(FLAG_USER); } String password = cmd.getOptionValue(F... | PropertyUtils { public UploadProperties getUploadProperties(String[] args) throws ParseException, MissingConfigException { CommandLine cmd = parser.parse(OPTIONS, args); String user = cmd.getOptionValue(FLAG_USER); if (user == null) { throw new MissingConfigException(FLAG_USER); } String password = cmd.getOptionValue(F... | PropertyUtils { public UploadProperties getUploadProperties(String[] args) throws ParseException, MissingConfigException { CommandLine cmd = parser.parse(OPTIONS, args); String user = cmd.getOptionValue(FLAG_USER); if (user == null) { throw new MissingConfigException(FLAG_USER); } String password = cmd.getOptionValue(F... |
@Test public void testGetStyle() { assertEquals(STYLE, param.getStyle()); } | public ParamStyle getStyle() { return style; } | Param extends WadlElement { public ParamStyle getStyle() { return style; } } | Param extends WadlElement { public ParamStyle getStyle() { return style; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Documentati... | Param extends WadlElement { public ParamStyle getStyle() { return style; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Documentati... | Param extends WadlElement { public ParamStyle getStyle() { return style; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Documentati... |
@Test public void testGetId() { assertEquals(ID, param.getId()); } | public String getId() { return id; } | Param extends WadlElement { public String getId() { return id; } } | Param extends WadlElement { public String getId() { return id; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Documentation> doc, f... | Param extends WadlElement { public String getId() { return id; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Documentation> doc, f... | Param extends WadlElement { public String getId() { return id; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Documentation> doc, f... |
@Test public void testGetType() { assertEquals(TYPE, param.getType()); } | public QName getType() { return type; } | Param extends WadlElement { public QName getType() { return type; } } | Param extends WadlElement { public QName getType() { return type; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Documentation> doc... | Param extends WadlElement { public QName getType() { return type; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Documentation> doc... | Param extends WadlElement { public QName getType() { return type; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Documentation> doc... |
@Test public void testGetDefault() { assertEquals(DEFAULT_VALUE, param.getDefault()); } | public String getDefault() { return defaultValue; } | Param extends WadlElement { public String getDefault() { return defaultValue; } } | Param extends WadlElement { public String getDefault() { return defaultValue; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Docume... | Param extends WadlElement { public String getDefault() { return defaultValue; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Docume... | Param extends WadlElement { public String getDefault() { return defaultValue; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Docume... |
@Test public void testGetRequired() { assertEquals(REQUIRED, param.getRequired()); } | public boolean getRequired() { return required; } | Param extends WadlElement { public boolean getRequired() { return required; } } | Param extends WadlElement { public boolean getRequired() { return required; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Document... | Param extends WadlElement { public boolean getRequired() { return required; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Document... | Param extends WadlElement { public boolean getRequired() { return required; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Document... |
@Test public void testGetRepeating() { assertEquals(REPEATING, param.getRepeating()); } | public boolean getRepeating() { return repeating; } | Param extends WadlElement { public boolean getRepeating() { return repeating; } } | Param extends WadlElement { public boolean getRepeating() { return repeating; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Docume... | Param extends WadlElement { public boolean getRepeating() { return repeating; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Docume... | Param extends WadlElement { public boolean getRepeating() { return repeating; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Docume... |
@Test public void testGetFixed() { assertEquals(FIXED, param.getFixed()); } | public String getFixed() { return fixed; } | Param extends WadlElement { public String getFixed() { return fixed; } } | Param extends WadlElement { public String getFixed() { return fixed; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Documentation> ... | Param extends WadlElement { public String getFixed() { return fixed; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Documentation> ... | Param extends WadlElement { public String getFixed() { return fixed; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Documentation> ... |
@Test public void testGetPath() { assertEquals(PATH, param.getPath()); } | public String getPath() { return path; } | Param extends WadlElement { public String getPath() { return path; } } | Param extends WadlElement { public String getPath() { return path; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Documentation> do... | Param extends WadlElement { public String getPath() { return path; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Documentation> do... | Param extends WadlElement { public String getPath() { return path; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Documentation> do... |
@Test public void testGetOptions() { assertEquals(OPTIONS, param.getOptions()); } | public List<Option> getOptions() { return options; } | Param extends WadlElement { public List<Option> getOptions() { return options; } } | Param extends WadlElement { public List<Option> getOptions() { return options; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Docum... | Param extends WadlElement { public List<Option> getOptions() { return options; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Docum... | Param extends WadlElement { public List<Option> getOptions() { return options; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Docum... |
@Test public void testGetLink() { assertEquals(LINK, param.getLink()); } | public Link getLink() { return link; } | Param extends WadlElement { public Link getLink() { return link; } } | Param extends WadlElement { public Link getLink() { return link; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Documentation> doc,... | Param extends WadlElement { public Link getLink() { return link; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Documentation> doc,... | Param extends WadlElement { public Link getLink() { return link; } Param(final String name, final ParamStyle style, final String id, final QName type,
final String defaultValue, final boolean required, final boolean repeating, final String fixed,
final String path, final List<Documentation> doc,... |
@Test public void testNoPurgeDeltas() throws Exception { Mockito.when(batchJobDAO.getDuplicateDetectionMode(jobId)).thenReturn(null); Exchange exchange = new DefaultExchange(new DefaultCamelContext()); WorkNote workNote = new WorkNote(jobId, false); exchange.getIn().setBody(workNote); boolean isEligible = batchJobManag... | public boolean isEligibleForDeltaPurge(Exchange exchange) { WorkNote workNote = exchange.getIn().getBody(WorkNote.class); String jobId = workNote.getBatchJobId(); String deltaMode = batchJobDAO.getDuplicateDetectionMode(jobId); if(deltaMode != null && isDeltaPurgeMode(deltaMode)) { return true; } return false; } | BatchJobManager { public boolean isEligibleForDeltaPurge(Exchange exchange) { WorkNote workNote = exchange.getIn().getBody(WorkNote.class); String jobId = workNote.getBatchJobId(); String deltaMode = batchJobDAO.getDuplicateDetectionMode(jobId); if(deltaMode != null && isDeltaPurgeMode(deltaMode)) { return true; } retu... | BatchJobManager { public boolean isEligibleForDeltaPurge(Exchange exchange) { WorkNote workNote = exchange.getIn().getBody(WorkNote.class); String jobId = workNote.getBatchJobId(); String deltaMode = batchJobDAO.getDuplicateDetectionMode(jobId); if(deltaMode != null && isDeltaPurgeMode(deltaMode)) { return true; } retu... | BatchJobManager { public boolean isEligibleForDeltaPurge(Exchange exchange) { WorkNote workNote = exchange.getIn().getBody(WorkNote.class); String jobId = workNote.getBatchJobId(); String deltaMode = batchJobDAO.getDuplicateDetectionMode(jobId); if(deltaMode != null && isDeltaPurgeMode(deltaMode)) { return true; } retu... | BatchJobManager { public boolean isEligibleForDeltaPurge(Exchange exchange) { WorkNote workNote = exchange.getIn().getBody(WorkNote.class); String jobId = workNote.getBatchJobId(); String deltaMode = batchJobDAO.getDuplicateDetectionMode(jobId); if(deltaMode != null && isDeltaPurgeMode(deltaMode)) { return true; } retu... |
@Test public void testToString() { assertTrue(!"".equals(param.toString())); } | @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("name").append(" : ").append(name); sb.append(", "); sb.append("style").append(" : ").append(style); sb.append(", "); sb.append("id").append(" : ").append(id); sb.append(", "); sb.append("type").append(" : ").ap... | Param extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("name").append(" : ").append(name); sb.append(", "); sb.append("style").append(" : ").append(style); sb.append(", "); sb.append("id").append(" : ").append(id); sb.append(", "); sb.app... | Param extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("name").append(" : ").append(name); sb.append(", "); sb.append("style").append(" : ").append(style); sb.append(", "); sb.append("id").append(" : ").append(id); sb.append(", "); sb.app... | Param extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("name").append(" : ").append(name); sb.append(", "); sb.append("style").append(" : ").append(style); sb.append(", "); sb.append("id").append(" : ").append(id); sb.append(", "); sb.app... | Param extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("name").append(" : ").append(name); sb.append(", "); sb.append("style").append(" : ").append(style); sb.append(", "); sb.append("id").append(" : ").append(id); sb.append(", "); sb.app... |
@Test public void testGetId() { assertEquals(ID, method.getId()); } | public String getId() { return id; } | Method extends WadlElement { public String getId() { return id; } } | Method extends WadlElement { public String getId() { return id; } Method(final String id, final String verb, final List<Documentation> doc, final Request request,
final List<Response> responses); } | Method extends WadlElement { public String getId() { return id; } Method(final String id, final String verb, final List<Documentation> doc, final Request request,
final List<Response> responses); String getId(); String getVerb(); Request getRequest(); List<Response> getResponses(); @Override String toString... | Method extends WadlElement { public String getId() { return id; } Method(final String id, final String verb, final List<Documentation> doc, final Request request,
final List<Response> responses); String getId(); String getVerb(); Request getRequest(); List<Response> getResponses(); @Override String toString... |
@Test public void testGetRequest() { assertEquals(REQUEST, method.getRequest()); } | public Request getRequest() { return request; } | Method extends WadlElement { public Request getRequest() { return request; } } | Method extends WadlElement { public Request getRequest() { return request; } Method(final String id, final String verb, final List<Documentation> doc, final Request request,
final List<Response> responses); } | Method extends WadlElement { public Request getRequest() { return request; } Method(final String id, final String verb, final List<Documentation> doc, final Request request,
final List<Response> responses); String getId(); String getVerb(); Request getRequest(); List<Response> getResponses(); @Override Stri... | Method extends WadlElement { public Request getRequest() { return request; } Method(final String id, final String verb, final List<Documentation> doc, final Request request,
final List<Response> responses); String getId(); String getVerb(); Request getRequest(); List<Response> getResponses(); @Override Stri... |
@Test public void testGetResponses() { assertEquals(RESPONSES, method.getResponses()); } | public List<Response> getResponses() { return responses; } | Method extends WadlElement { public List<Response> getResponses() { return responses; } } | Method extends WadlElement { public List<Response> getResponses() { return responses; } Method(final String id, final String verb, final List<Documentation> doc, final Request request,
final List<Response> responses); } | Method extends WadlElement { public List<Response> getResponses() { return responses; } Method(final String id, final String verb, final List<Documentation> doc, final Request request,
final List<Response> responses); String getId(); String getVerb(); Request getRequest(); List<Response> getResponses(); @Ov... | Method extends WadlElement { public List<Response> getResponses() { return responses; } Method(final String id, final String verb, final List<Documentation> doc, final Request request,
final List<Response> responses); String getId(); String getVerb(); Request getRequest(); List<Response> getResponses(); @Ov... |
@Test public void testGetVerb() { assertEquals(VERB, method.getVerb()); } | public String getVerb() { return verb; } | Method extends WadlElement { public String getVerb() { return verb; } } | Method extends WadlElement { public String getVerb() { return verb; } Method(final String id, final String verb, final List<Documentation> doc, final Request request,
final List<Response> responses); } | Method extends WadlElement { public String getVerb() { return verb; } Method(final String id, final String verb, final List<Documentation> doc, final Request request,
final List<Response> responses); String getId(); String getVerb(); Request getRequest(); List<Response> getResponses(); @Override String toSt... | Method extends WadlElement { public String getVerb() { return verb; } Method(final String id, final String verb, final List<Documentation> doc, final Request request,
final List<Response> responses); String getId(); String getVerb(); Request getRequest(); List<Response> getResponses(); @Override String toSt... |
@Test public void testToString() { assertTrue(!"".equals(method.toString())); } | @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("id").append(" : ").append(id); sb.append(", "); sb.append("name").append(" : ").append(verb); sb.append(", "); sb.append("request").append(" : ").append(request); sb.append(", "); sb.append("responses").append(... | Method extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("id").append(" : ").append(id); sb.append(", "); sb.append("name").append(" : ").append(verb); sb.append(", "); sb.append("request").append(" : ").append(request); sb.append(", "); s... | Method extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("id").append(" : ").append(id); sb.append(", "); sb.append("name").append(" : ").append(verb); sb.append(", "); sb.append("request").append(" : ").append(request); sb.append(", "); s... | Method extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("id").append(" : ").append(id); sb.append(", "); sb.append("name").append(" : ").append(verb); sb.append(", "); sb.append("request").append(" : ").append(request); sb.append(", "); s... | Method extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("id").append(" : ").append(id); sb.append(", "); sb.append("name").append(" : ").append(verb); sb.append(", "); sb.append("request").append(" : ").append(request); sb.append(", "); s... |
@Test public void testGetBase() { assertEquals(BASE, resources.getBase()); } | public String getBase() { return base; } | Resources extends WadlElement { public String getBase() { return base; } } | Resources extends WadlElement { public String getBase() { return base; } Resources(final String base, final List<Documentation> doc, final List<Resource> resources); } | Resources extends WadlElement { public String getBase() { return base; } Resources(final String base, final List<Documentation> doc, final List<Resource> resources); String getBase(); List<Resource> getResources(); @Override String toString(); } | Resources extends WadlElement { public String getBase() { return base; } Resources(final String base, final List<Documentation> doc, final List<Resource> resources); String getBase(); List<Resource> getResources(); @Override String toString(); } |
@Test public void testGetResources() { assertEquals(RESOURCE_LIST, resources.getResources()); } | public List<Resource> getResources() { return resources; } | Resources extends WadlElement { public List<Resource> getResources() { return resources; } } | Resources extends WadlElement { public List<Resource> getResources() { return resources; } Resources(final String base, final List<Documentation> doc, final List<Resource> resources); } | Resources extends WadlElement { public List<Resource> getResources() { return resources; } Resources(final String base, final List<Documentation> doc, final List<Resource> resources); String getBase(); List<Resource> getResources(); @Override String toString(); } | Resources extends WadlElement { public List<Resource> getResources() { return resources; } Resources(final String base, final List<Documentation> doc, final List<Resource> resources); String getBase(); List<Resource> getResources(); @Override String toString(); } |
@Test public void testToString() { assertTrue(!"".equals(resources.toString())); } | @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("base").append(" : ").append(base); sb.append(", "); sb.append("resources").append(" : ").append(resources); sb.append(", "); sb.append("doc").append(" : ").append(getDocumentation()); sb.append("}"); return sb.... | Resources extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("base").append(" : ").append(base); sb.append(", "); sb.append("resources").append(" : ").append(resources); sb.append(", "); sb.append("doc").append(" : ").append(getDocumentatio... | Resources extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("base").append(" : ").append(base); sb.append(", "); sb.append("resources").append(" : ").append(resources); sb.append(", "); sb.append("doc").append(" : ").append(getDocumentatio... | Resources extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("base").append(" : ").append(base); sb.append(", "); sb.append("resources").append(" : ").append(resources); sb.append(", "); sb.append("doc").append(" : ").append(getDocumentatio... | Resources extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("base").append(" : ").append(base); sb.append(", "); sb.append("resources").append(" : ").append(resources); sb.append(", "); sb.append("doc").append(" : ").append(getDocumentatio... |
@Test public void testGetHref() { assertEquals(HREF, include.getHref()); } | public String getHref() { return href; } | Include extends WadlElement { public String getHref() { return href; } } | Include extends WadlElement { public String getHref() { return href; } Include(final String href, final List<Documentation> doc); } | Include extends WadlElement { public String getHref() { return href; } Include(final String href, final List<Documentation> doc); String getHref(); } | Include extends WadlElement { public String getHref() { return href; } Include(final String href, final List<Documentation> doc); String getHref(); } |
@Test public void testDirectory() throws NoSuchFieldException, IllegalAccessException, IOException { File ctlFile = Mockito.mock(File.class); Mockito.when(ctlFile.getName()).thenReturn("Test"); Mockito.when(ctlFile.isFile()).thenReturn(false); AbstractMessageReport messageReport = Mockito.mock(AbstractMessageReport.cla... | public void doValidation(File path) { ReportStats reportStats = new SimpleReportStats(); if (path.isFile()) { if (path.getName().endsWith(".ctl")) { processControlFile(path.getParentFile().getAbsoluteFile(), path.getName(), reportStats); } else if (path.getName().endsWith(".zip")) { processZip(path, reportStats); } els... | ValidationController { public void doValidation(File path) { ReportStats reportStats = new SimpleReportStats(); if (path.isFile()) { if (path.getName().endsWith(".ctl")) { processControlFile(path.getParentFile().getAbsoluteFile(), path.getName(), reportStats); } else if (path.getName().endsWith(".zip")) { processZip(pa... | ValidationController { public void doValidation(File path) { ReportStats reportStats = new SimpleReportStats(); if (path.isFile()) { if (path.getName().endsWith(".ctl")) { processControlFile(path.getParentFile().getAbsoluteFile(), path.getName(), reportStats); } else if (path.getName().endsWith(".zip")) { processZip(pa... | ValidationController { public void doValidation(File path) { ReportStats reportStats = new SimpleReportStats(); if (path.isFile()) { if (path.getName().endsWith(".ctl")) { processControlFile(path.getParentFile().getAbsoluteFile(), path.getName(), reportStats); } else if (path.getName().endsWith(".zip")) { processZip(pa... | ValidationController { public void doValidation(File path) { ReportStats reportStats = new SimpleReportStats(); if (path.isFile()) { if (path.getName().endsWith(".ctl")) { processControlFile(path.getParentFile().getAbsoluteFile(), path.getName(), reportStats); } else if (path.getName().endsWith(".zip")) { processZip(pa... |
@Test public void testGetGrammars() { assertEquals(GRAMMARS, application.getGrammars()); } | public Grammars getGrammars() { return grammars; } | Application extends WadlElement { public Grammars getGrammars() { return grammars; } } | Application extends WadlElement { public Grammars getGrammars() { return grammars; } Application(final List<Documentation> doc, final Grammars grammars, final Resources resources,
final List<ResourceType> resourceTypes, final List<Method> methods,
final List<Representation> representations, fina... | Application extends WadlElement { public Grammars getGrammars() { return grammars; } Application(final List<Documentation> doc, final Grammars grammars, final Resources resources,
final List<ResourceType> resourceTypes, final List<Method> methods,
final List<Representation> representations, fina... | Application extends WadlElement { public Grammars getGrammars() { return grammars; } Application(final List<Documentation> doc, final Grammars grammars, final Resources resources,
final List<ResourceType> resourceTypes, final List<Method> methods,
final List<Representation> representations, fina... |
@Test public void testGetResources() { assertEquals(RESOURCES, application.getResources()); } | public Resources getResources() { return resources; } | Application extends WadlElement { public Resources getResources() { return resources; } } | Application extends WadlElement { public Resources getResources() { return resources; } Application(final List<Documentation> doc, final Grammars grammars, final Resources resources,
final List<ResourceType> resourceTypes, final List<Method> methods,
final List<Representation> representations, f... | Application extends WadlElement { public Resources getResources() { return resources; } Application(final List<Documentation> doc, final Grammars grammars, final Resources resources,
final List<ResourceType> resourceTypes, final List<Method> methods,
final List<Representation> representations, f... | Application extends WadlElement { public Resources getResources() { return resources; } Application(final List<Documentation> doc, final Grammars grammars, final Resources resources,
final List<ResourceType> resourceTypes, final List<Method> methods,
final List<Representation> representations, f... |
@Test public void testGetResourceTypes() { assertEquals(RESOURCE_TYPES, application.getResourceTypes()); } | public List<ResourceType> getResourceTypes() { return resourceTypes; } | Application extends WadlElement { public List<ResourceType> getResourceTypes() { return resourceTypes; } } | Application extends WadlElement { public List<ResourceType> getResourceTypes() { return resourceTypes; } Application(final List<Documentation> doc, final Grammars grammars, final Resources resources,
final List<ResourceType> resourceTypes, final List<Method> methods,
final List<Representation> r... | Application extends WadlElement { public List<ResourceType> getResourceTypes() { return resourceTypes; } Application(final List<Documentation> doc, final Grammars grammars, final Resources resources,
final List<ResourceType> resourceTypes, final List<Method> methods,
final List<Representation> r... | Application extends WadlElement { public List<ResourceType> getResourceTypes() { return resourceTypes; } Application(final List<Documentation> doc, final Grammars grammars, final Resources resources,
final List<ResourceType> resourceTypes, final List<Method> methods,
final List<Representation> r... |
@Test public void testGetMethods() { assertEquals(METHODS, application.getMethods()); } | public List<Method> getMethods() { return methods; } | Application extends WadlElement { public List<Method> getMethods() { return methods; } } | Application extends WadlElement { public List<Method> getMethods() { return methods; } Application(final List<Documentation> doc, final Grammars grammars, final Resources resources,
final List<ResourceType> resourceTypes, final List<Method> methods,
final List<Representation> representations, fi... | Application extends WadlElement { public List<Method> getMethods() { return methods; } Application(final List<Documentation> doc, final Grammars grammars, final Resources resources,
final List<ResourceType> resourceTypes, final List<Method> methods,
final List<Representation> representations, fi... | Application extends WadlElement { public List<Method> getMethods() { return methods; } Application(final List<Documentation> doc, final Grammars grammars, final Resources resources,
final List<ResourceType> resourceTypes, final List<Method> methods,
final List<Representation> representations, fi... |
@Test public void testGetRepresentations() { assertEquals(REPRESENTATIONS, application.getRepresentations()); } | public List<Representation> getRepresentations() { return representations; } | Application extends WadlElement { public List<Representation> getRepresentations() { return representations; } } | Application extends WadlElement { public List<Representation> getRepresentations() { return representations; } Application(final List<Documentation> doc, final Grammars grammars, final Resources resources,
final List<ResourceType> resourceTypes, final List<Method> methods,
final List<Representat... | Application extends WadlElement { public List<Representation> getRepresentations() { return representations; } Application(final List<Documentation> doc, final Grammars grammars, final Resources resources,
final List<ResourceType> resourceTypes, final List<Method> methods,
final List<Representat... | Application extends WadlElement { public List<Representation> getRepresentations() { return representations; } Application(final List<Documentation> doc, final Grammars grammars, final Resources resources,
final List<ResourceType> resourceTypes, final List<Method> methods,
final List<Representat... |
@Test public void testGetFaults() { assertEquals(REPRESENTATIONS, application.getFaults()); } | public List<Representation> getFaults() { return faults; } | Application extends WadlElement { public List<Representation> getFaults() { return faults; } } | Application extends WadlElement { public List<Representation> getFaults() { return faults; } Application(final List<Documentation> doc, final Grammars grammars, final Resources resources,
final List<ResourceType> resourceTypes, final List<Method> methods,
final List<Representation> representatio... | Application extends WadlElement { public List<Representation> getFaults() { return faults; } Application(final List<Documentation> doc, final Grammars grammars, final Resources resources,
final List<ResourceType> resourceTypes, final List<Method> methods,
final List<Representation> representatio... | Application extends WadlElement { public List<Representation> getFaults() { return faults; } Application(final List<Documentation> doc, final Grammars grammars, final Resources resources,
final List<ResourceType> resourceTypes, final List<Method> methods,
final List<Representation> representatio... |
@Test public void testToString() { assertTrue(!"".equals(application.toString())); } | @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("grammars").append(" : ").append(grammars); sb.append(", "); sb.append("resources").append(" : ").append(resources); sb.append(", "); sb.append("resourceTypes").append(" : ").append(resourceTypes); sb.append(", ... | Application extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("grammars").append(" : ").append(grammars); sb.append(", "); sb.append("resources").append(" : ").append(resources); sb.append(", "); sb.append("resourceTypes").append(" : ").ap... | Application extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("grammars").append(" : ").append(grammars); sb.append(", "); sb.append("resources").append(" : ").append(resources); sb.append(", "); sb.append("resourceTypes").append(" : ").ap... | Application extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("grammars").append(" : ").append(grammars); sb.append(", "); sb.append("resources").append(" : ").append(resources); sb.append(", "); sb.append("resourceTypes").append(" : ").ap... | Application extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("grammars").append(" : ").append(grammars); sb.append(", "); sb.append("resources").append(" : ").append(resources); sb.append(", "); sb.append("resourceTypes").append(" : ").ap... |
@Test public void testMain() throws IOException { SelectorDoc.main(ARGS); File file = new File(OUTPUT_FILENAME); assertTrue(file.exists()); file.delete(); } | public static void main(String[] args) { try { new SelectorDoc(args[0], args[1]).generateSelectorDocumentation(); } catch (IOException e) { LOG.warn(e.getMessage()); } } | SelectorDoc { public static void main(String[] args) { try { new SelectorDoc(args[0], args[1]).generateSelectorDocumentation(); } catch (IOException e) { LOG.warn(e.getMessage()); } } } | SelectorDoc { public static void main(String[] args) { try { new SelectorDoc(args[0], args[1]).generateSelectorDocumentation(); } catch (IOException e) { LOG.warn(e.getMessage()); } } SelectorDoc(String inputXmiFilename, String outputXmlFilename); } | SelectorDoc { public static void main(String[] args) { try { new SelectorDoc(args[0], args[1]).generateSelectorDocumentation(); } catch (IOException e) { LOG.warn(e.getMessage()); } } SelectorDoc(String inputXmiFilename, String outputXmlFilename); static void main(String[] args); } | SelectorDoc { public static void main(String[] args) { try { new SelectorDoc(args[0], args[1]).generateSelectorDocumentation(); } catch (IOException e) { LOG.warn(e.getMessage()); } } SelectorDoc(String inputXmiFilename, String outputXmlFilename); static void main(String[] args); static final String ATTRIBUTE; static f... |
@Test public void testWriteBuffer() throws IOException { Writer writer = mock(Writer.class); assertTrue(this.selectorDoc.writeSelectorDocumentationToFile("foo", writer)); } | protected boolean writeSelectorDocumentationToFile(String documentationString, Writer output) { if (documentationString == null) { return false; } try { output.write(documentationString); output.flush(); output.close(); } catch (IOException e) { LOG.warn(e.getMessage()); return false; } return true; } | SelectorDoc { protected boolean writeSelectorDocumentationToFile(String documentationString, Writer output) { if (documentationString == null) { return false; } try { output.write(documentationString); output.flush(); output.close(); } catch (IOException e) { LOG.warn(e.getMessage()); return false; } return true; } } | SelectorDoc { protected boolean writeSelectorDocumentationToFile(String documentationString, Writer output) { if (documentationString == null) { return false; } try { output.write(documentationString); output.flush(); output.close(); } catch (IOException e) { LOG.warn(e.getMessage()); return false; } return true; } Sel... | SelectorDoc { protected boolean writeSelectorDocumentationToFile(String documentationString, Writer output) { if (documentationString == null) { return false; } try { output.write(documentationString); output.flush(); output.close(); } catch (IOException e) { LOG.warn(e.getMessage()); return false; } return true; } Sel... | SelectorDoc { protected boolean writeSelectorDocumentationToFile(String documentationString, Writer output) { if (documentationString == null) { return false; } try { output.write(documentationString); output.flush(); output.close(); } catch (IOException e) { LOG.warn(e.getMessage()); return false; } return true; } Sel... |
@Test public void testAppendClassTypeAttributes() { this.selectorDoc.appendClassTypeAttributes(stringBuffer, CLASS_TYPE); String part1 = String.format(SelectorDoc.FEATURE, SelectorDoc.ATTRIBUTE, ATTRIBUTE1_NAME); String part2 = String.format(SelectorDoc.FEATURE, SelectorDoc.ATTRIBUTE, ATTRIBUTE2_NAME); String expectedT... | protected void appendClassTypeAttributes(StringBuffer stringBuffer, ClassType classType) { for (Attribute attribute : classType.getAttributes()) { stringBuffer.append(String.format(FEATURE, ATTRIBUTE, attribute.getName())); } } | SelectorDoc { protected void appendClassTypeAttributes(StringBuffer stringBuffer, ClassType classType) { for (Attribute attribute : classType.getAttributes()) { stringBuffer.append(String.format(FEATURE, ATTRIBUTE, attribute.getName())); } } } | SelectorDoc { protected void appendClassTypeAttributes(StringBuffer stringBuffer, ClassType classType) { for (Attribute attribute : classType.getAttributes()) { stringBuffer.append(String.format(FEATURE, ATTRIBUTE, attribute.getName())); } } SelectorDoc(String inputXmiFilename, String outputXmlFilename); } | SelectorDoc { protected void appendClassTypeAttributes(StringBuffer stringBuffer, ClassType classType) { for (Attribute attribute : classType.getAttributes()) { stringBuffer.append(String.format(FEATURE, ATTRIBUTE, attribute.getName())); } } SelectorDoc(String inputXmiFilename, String outputXmlFilename); static void ma... | SelectorDoc { protected void appendClassTypeAttributes(StringBuffer stringBuffer, ClassType classType) { for (Attribute attribute : classType.getAttributes()) { stringBuffer.append(String.format(FEATURE, ATTRIBUTE, attribute.getName())); } } SelectorDoc(String inputXmiFilename, String outputXmlFilename); static void ma... |
@Test public void testDoValidationInvalidFile() throws NoSuchFieldException, IllegalAccessException, IOException { AbstractMessageReport messageReport = Mockito.mock(AbstractMessageReport.class); PrivateAccessor.setField(validationController, "messageReport", messageReport); File invalidFile = Mockito.mock(File.class);... | public void doValidation(File path) { ReportStats reportStats = new SimpleReportStats(); if (path.isFile()) { if (path.getName().endsWith(".ctl")) { processControlFile(path.getParentFile().getAbsoluteFile(), path.getName(), reportStats); } else if (path.getName().endsWith(".zip")) { processZip(path, reportStats); } els... | ValidationController { public void doValidation(File path) { ReportStats reportStats = new SimpleReportStats(); if (path.isFile()) { if (path.getName().endsWith(".ctl")) { processControlFile(path.getParentFile().getAbsoluteFile(), path.getName(), reportStats); } else if (path.getName().endsWith(".zip")) { processZip(pa... | ValidationController { public void doValidation(File path) { ReportStats reportStats = new SimpleReportStats(); if (path.isFile()) { if (path.getName().endsWith(".ctl")) { processControlFile(path.getParentFile().getAbsoluteFile(), path.getName(), reportStats); } else if (path.getName().endsWith(".zip")) { processZip(pa... | ValidationController { public void doValidation(File path) { ReportStats reportStats = new SimpleReportStats(); if (path.isFile()) { if (path.getName().endsWith(".ctl")) { processControlFile(path.getParentFile().getAbsoluteFile(), path.getName(), reportStats); } else if (path.getName().endsWith(".zip")) { processZip(pa... | ValidationController { public void doValidation(File path) { ReportStats reportStats = new SimpleReportStats(); if (path.isFile()) { if (path.getName().endsWith(".ctl")) { processControlFile(path.getParentFile().getAbsoluteFile(), path.getName(), reportStats); } else if (path.getName().endsWith(".zip")) { processZip(pa... |
@Test public void testAppendClassTypeAssociations() { this.selectorDoc.appendClassTypeAssociations(stringBuffer, CLASS_TYPE, MODEL_INDEX); String part1 = String.format(SelectorDoc.FEATURE, SelectorDoc.ASSOCIATION, ASSOCIATION_END1_NAME); String part2 = String.format(SelectorDoc.FEATURE, SelectorDoc.ASSOCIATION, ASSOCIA... | protected void appendClassTypeAssociations(StringBuffer stringBuffer, ClassType classType, ModelIndex modelIndex) { for (AssociationEnd associationEnd : modelIndex.getAssociationEnds(classType.getId())) { stringBuffer.append(String.format(FEATURE, ASSOCIATION, associationEnd.getName())); } } | SelectorDoc { protected void appendClassTypeAssociations(StringBuffer stringBuffer, ClassType classType, ModelIndex modelIndex) { for (AssociationEnd associationEnd : modelIndex.getAssociationEnds(classType.getId())) { stringBuffer.append(String.format(FEATURE, ASSOCIATION, associationEnd.getName())); } } } | SelectorDoc { protected void appendClassTypeAssociations(StringBuffer stringBuffer, ClassType classType, ModelIndex modelIndex) { for (AssociationEnd associationEnd : modelIndex.getAssociationEnds(classType.getId())) { stringBuffer.append(String.format(FEATURE, ASSOCIATION, associationEnd.getName())); } } SelectorDoc(S... | SelectorDoc { protected void appendClassTypeAssociations(StringBuffer stringBuffer, ClassType classType, ModelIndex modelIndex) { for (AssociationEnd associationEnd : modelIndex.getAssociationEnds(classType.getId())) { stringBuffer.append(String.format(FEATURE, ASSOCIATION, associationEnd.getName())); } } SelectorDoc(S... | SelectorDoc { protected void appendClassTypeAssociations(StringBuffer stringBuffer, ClassType classType, ModelIndex modelIndex) { for (AssociationEnd associationEnd : modelIndex.getAssociationEnds(classType.getId())) { stringBuffer.append(String.format(FEATURE, ASSOCIATION, associationEnd.getName())); } } SelectorDoc(S... |
@Test public void testGetSelectorDocumentation() { String receivedResult = this.selectorDoc.getSelectorDocumentation(MODEL_INDEX); String part1 = String.format(SelectorDoc.SIMPLE_SECT_START, CLASS_TYPE_NAME) + SelectorDoc.FEATURES_START; String part2 = String.format(SelectorDoc.FEATURE, SelectorDoc.ATTRIBUTE, ATTRIBUTE... | protected String getSelectorDocumentation(ModelIndex modelIndex) { StringBuffer stringBuffer = new StringBuffer(); Map<String, ClassType> classTypes = modelIndex.getClassTypes(); for (Entry<String, ClassType> classTypeEntry : classTypes.entrySet()) { ClassType classType = classTypeEntry.getValue(); stringBuffer.append(... | SelectorDoc { protected String getSelectorDocumentation(ModelIndex modelIndex) { StringBuffer stringBuffer = new StringBuffer(); Map<String, ClassType> classTypes = modelIndex.getClassTypes(); for (Entry<String, ClassType> classTypeEntry : classTypes.entrySet()) { ClassType classType = classTypeEntry.getValue(); string... | SelectorDoc { protected String getSelectorDocumentation(ModelIndex modelIndex) { StringBuffer stringBuffer = new StringBuffer(); Map<String, ClassType> classTypes = modelIndex.getClassTypes(); for (Entry<String, ClassType> classTypeEntry : classTypes.entrySet()) { ClassType classType = classTypeEntry.getValue(); string... | SelectorDoc { protected String getSelectorDocumentation(ModelIndex modelIndex) { StringBuffer stringBuffer = new StringBuffer(); Map<String, ClassType> classTypes = modelIndex.getClassTypes(); for (Entry<String, ClassType> classTypeEntry : classTypes.entrySet()) { ClassType classType = classTypeEntry.getValue(); string... | SelectorDoc { protected String getSelectorDocumentation(ModelIndex modelIndex) { StringBuffer stringBuffer = new StringBuffer(); Map<String, ClassType> classTypes = modelIndex.getClassTypes(); for (Entry<String, ClassType> classTypeEntry : classTypes.entrySet()) { ClassType classType = classTypeEntry.getValue(); string... |
@Test public void testGetModelIndex() throws FileNotFoundException { Model model = this.selectorDoc.readModel(); ModelIndex modelIndex = this.selectorDoc.getModelIndex(model); assertNotNull("Expected non-null modelIndex", modelIndex); } | protected ModelIndex getModelIndex(Model model) { if (model != null) { return new DefaultModelIndex(model); } else { return null; } } | SelectorDoc { protected ModelIndex getModelIndex(Model model) { if (model != null) { return new DefaultModelIndex(model); } else { return null; } } } | SelectorDoc { protected ModelIndex getModelIndex(Model model) { if (model != null) { return new DefaultModelIndex(model); } else { return null; } } SelectorDoc(String inputXmiFilename, String outputXmlFilename); } | SelectorDoc { protected ModelIndex getModelIndex(Model model) { if (model != null) { return new DefaultModelIndex(model); } else { return null; } } SelectorDoc(String inputXmiFilename, String outputXmlFilename); static void main(String[] args); } | SelectorDoc { protected ModelIndex getModelIndex(Model model) { if (model != null) { return new DefaultModelIndex(model); } else { return null; } } SelectorDoc(String inputXmiFilename, String outputXmlFilename); static void main(String[] args); static final String ATTRIBUTE; static final String ASSOCIATION; } |
@Test public void testXsdGen() throws IOException { final File outFile = new File("test_sli.xsd"); if (!outFile.exists()) { if (!outFile.createNewFile()) { Assert.fail("failed to create temp file " + outFile.getName()); } } final String folder = getFolder(outFile); final String file = outFile.getName(); final String[] ... | public static void main(final String[] args) { final OptionParser parser = new OptionParser(); final OptionSpec<?> helpSpec = parser.acceptsAll(ARGUMENT_HELP, "Show help"); final OptionSpec<File> documentFileSpec = optionSpec(parser, ARGUMENT_DOCUMENT_FILE, "Domain file", File.class); final OptionSpec<File> xmiFileSpec... | XsdGen { public static void main(final String[] args) { final OptionParser parser = new OptionParser(); final OptionSpec<?> helpSpec = parser.acceptsAll(ARGUMENT_HELP, "Show help"); final OptionSpec<File> documentFileSpec = optionSpec(parser, ARGUMENT_DOCUMENT_FILE, "Domain file", File.class); final OptionSpec<File> xm... | XsdGen { public static void main(final String[] args) { final OptionParser parser = new OptionParser(); final OptionSpec<?> helpSpec = parser.acceptsAll(ARGUMENT_HELP, "Show help"); final OptionSpec<File> documentFileSpec = optionSpec(parser, ARGUMENT_DOCUMENT_FILE, "Domain file", File.class); final OptionSpec<File> xm... | XsdGen { public static void main(final String[] args) { final OptionParser parser = new OptionParser(); final OptionSpec<?> helpSpec = parser.acceptsAll(ARGUMENT_HELP, "Show help"); final OptionSpec<File> documentFileSpec = optionSpec(parser, ARGUMENT_DOCUMENT_FILE, "Domain file", File.class); final OptionSpec<File> xm... | XsdGen { public static void main(final String[] args) { final OptionParser parser = new OptionParser(); final OptionSpec<?> helpSpec = parser.acceptsAll(ARGUMENT_HELP, "Show help"); final OptionSpec<File> documentFileSpec = optionSpec(parser, ARGUMENT_DOCUMENT_FILE, "Domain file", File.class); final OptionSpec<File> xm... |
@Test public void testGetName() throws Exception { Range range; Multiplicity multiplicity; final Identifier id = Identifier.fromString("1234"); AssociationEnd mockEnd; final ModelIndex mockIndex = Mockito.mock(ModelIndex.class); final Type type = Mockito.mock(Type.class); Uml2XsdSyntheticHasName test; Mockito.when(mock... | @Override public String getName() { final Occurs upperBound = end.getMultiplicity().getRange().getUpper(); final boolean plural = Occurs.UNBOUNDED.equals(upperBound); return adjustPlurality(Uml2XsdTools.camelCase(lookup.getType(end.getType()).getName()), plural); } | Uml2XsdSyntheticHasName implements HasName { @Override public String getName() { final Occurs upperBound = end.getMultiplicity().getRange().getUpper(); final boolean plural = Occurs.UNBOUNDED.equals(upperBound); return adjustPlurality(Uml2XsdTools.camelCase(lookup.getType(end.getType()).getName()), plural); } } | Uml2XsdSyntheticHasName implements HasName { @Override public String getName() { final Occurs upperBound = end.getMultiplicity().getRange().getUpper(); final boolean plural = Occurs.UNBOUNDED.equals(upperBound); return adjustPlurality(Uml2XsdTools.camelCase(lookup.getType(end.getType()).getName()), plural); } Uml2XsdSy... | Uml2XsdSyntheticHasName implements HasName { @Override public String getName() { final Occurs upperBound = end.getMultiplicity().getRange().getUpper(); final boolean plural = Occurs.UNBOUNDED.equals(upperBound); return adjustPlurality(Uml2XsdTools.camelCase(lookup.getType(end.getType()).getName()), plural); } Uml2XsdSy... | Uml2XsdSyntheticHasName implements HasName { @Override public String getName() { final Occurs upperBound = end.getMultiplicity().getRange().getUpper(); final boolean plural = Occurs.UNBOUNDED.equals(upperBound); return adjustPlurality(Uml2XsdTools.camelCase(lookup.getType(end.getType()).getName()), plural); } Uml2XsdSy... |
@Test public void testDeclarePrefixMappings() throws Exception { final Map<String, String> mappings = pluginForREST.declarePrefixMappings(); Assert.assertTrue(mappings.containsKey(TARGET_NAMESPACE_PREFIX)); } | @Override public Map<String, String> declarePrefixMappings() { final Map<String, String> pms = new HashMap<String, String>(); if (TARGET_NAMESPACE.trim().length() > 0) { pms.put(TARGET_NAMESPACE_PREFIX, TARGET_NAMESPACE); } return Collections.unmodifiableMap(pms); } | PluginForREST implements Uml2XsdPlugin { @Override public Map<String, String> declarePrefixMappings() { final Map<String, String> pms = new HashMap<String, String>(); if (TARGET_NAMESPACE.trim().length() > 0) { pms.put(TARGET_NAMESPACE_PREFIX, TARGET_NAMESPACE); } return Collections.unmodifiableMap(pms); } } | PluginForREST implements Uml2XsdPlugin { @Override public Map<String, String> declarePrefixMappings() { final Map<String, String> pms = new HashMap<String, String>(); if (TARGET_NAMESPACE.trim().length() > 0) { pms.put(TARGET_NAMESPACE_PREFIX, TARGET_NAMESPACE); } return Collections.unmodifiableMap(pms); } } | PluginForREST implements Uml2XsdPlugin { @Override public Map<String, String> declarePrefixMappings() { final Map<String, String> pms = new HashMap<String, String>(); if (TARGET_NAMESPACE.trim().length() > 0) { pms.put(TARGET_NAMESPACE_PREFIX, TARGET_NAMESPACE); } return Collections.unmodifiableMap(pms); } @Override M... | PluginForREST implements Uml2XsdPlugin { @Override public Map<String, String> declarePrefixMappings() { final Map<String, String> pms = new HashMap<String, String>(); if (TARGET_NAMESPACE.trim().length() > 0) { pms.put(TARGET_NAMESPACE_PREFIX, TARGET_NAMESPACE); } return Collections.unmodifiableMap(pms); } @Override M... |
@Test public void testGetElementNameQName() throws Exception { final QName expected = new QName(TARGET_NAMESPACE, "myTest", TARGET_NAMESPACE_PREFIX); Assert.assertEquals(expected, pluginForREST.getElementName("MyTest", false)); } | @Override public QName getElementName(final String name, final boolean isReference) { return new QName(TARGET_NAMESPACE, Uml2XsdTools.camelCase(name), TARGET_NAMESPACE_PREFIX); } | PluginForREST implements Uml2XsdPlugin { @Override public QName getElementName(final String name, final boolean isReference) { return new QName(TARGET_NAMESPACE, Uml2XsdTools.camelCase(name), TARGET_NAMESPACE_PREFIX); } } | PluginForREST implements Uml2XsdPlugin { @Override public QName getElementName(final String name, final boolean isReference) { return new QName(TARGET_NAMESPACE, Uml2XsdTools.camelCase(name), TARGET_NAMESPACE_PREFIX); } } | PluginForREST implements Uml2XsdPlugin { @Override public QName getElementName(final String name, final boolean isReference) { return new QName(TARGET_NAMESPACE, Uml2XsdTools.camelCase(name), TARGET_NAMESPACE_PREFIX); } @Override Map<String, String> declarePrefixMappings(); @Override QName getElementName(final String ... | PluginForREST implements Uml2XsdPlugin { @Override public QName getElementName(final String name, final boolean isReference) { return new QName(TARGET_NAMESPACE, Uml2XsdTools.camelCase(name), TARGET_NAMESPACE_PREFIX); } @Override Map<String, String> declarePrefixMappings(); @Override QName getElementName(final String ... |
@Test public void testGetElementType() throws Exception { final QName expected = new QName(TARGET_NAMESPACE, "MyTest", TARGET_NAMESPACE_PREFIX); Assert.assertEquals(expected, pluginForREST.getElementType("MyTest", false)); } | @Override public QName getElementType(final String name, final boolean isAssociation) { return getTypeName(name); } | PluginForREST implements Uml2XsdPlugin { @Override public QName getElementType(final String name, final boolean isAssociation) { return getTypeName(name); } } | PluginForREST implements Uml2XsdPlugin { @Override public QName getElementType(final String name, final boolean isAssociation) { return getTypeName(name); } } | PluginForREST implements Uml2XsdPlugin { @Override public QName getElementType(final String name, final boolean isAssociation) { return getTypeName(name); } @Override Map<String, String> declarePrefixMappings(); @Override QName getElementName(final String name, final boolean isReference); @Override QName getElementTyp... | PluginForREST implements Uml2XsdPlugin { @Override public QName getElementType(final String name, final boolean isAssociation) { return getTypeName(name); } @Override Map<String, String> declarePrefixMappings(); @Override QName getElementName(final String name, final boolean isReference); @Override QName getElementTyp... |
@Test public void testGetGraphAssociationEndName() throws Exception { final PsmDocument<Type> doc = new PsmDocument<Type>(Mockito.mock(Type.class), new PsmResource("resource"), new PsmCollection("collection")); final QName expected = new QName(TARGET_NAMESPACE, "resource", TARGET_NAMESPACE_PREFIX); Assert.assertEquals(... | @Override public QName getGraphAssociationEndName(final PsmDocument<Type> classType) { return new QName(TARGET_NAMESPACE, classType.getGraphAssociationEndName().getName(), TARGET_NAMESPACE_PREFIX); } | PluginForREST implements Uml2XsdPlugin { @Override public QName getGraphAssociationEndName(final PsmDocument<Type> classType) { return new QName(TARGET_NAMESPACE, classType.getGraphAssociationEndName().getName(), TARGET_NAMESPACE_PREFIX); } } | PluginForREST implements Uml2XsdPlugin { @Override public QName getGraphAssociationEndName(final PsmDocument<Type> classType) { return new QName(TARGET_NAMESPACE, classType.getGraphAssociationEndName().getName(), TARGET_NAMESPACE_PREFIX); } } | PluginForREST implements Uml2XsdPlugin { @Override public QName getGraphAssociationEndName(final PsmDocument<Type> classType) { return new QName(TARGET_NAMESPACE, classType.getGraphAssociationEndName().getName(), TARGET_NAMESPACE_PREFIX); } @Override Map<String, String> declarePrefixMappings(); @Override QName getElem... | PluginForREST implements Uml2XsdPlugin { @Override public QName getGraphAssociationEndName(final PsmDocument<Type> classType) { return new QName(TARGET_NAMESPACE, classType.getGraphAssociationEndName().getName(), TARGET_NAMESPACE_PREFIX); } @Override Map<String, String> declarePrefixMappings(); @Override QName getElem... |
@Test public void testGetElementName() throws Exception { final PsmDocument<Type> doc = new PsmDocument<Type>(Mockito.mock(Type.class), new PsmResource("resource"), new PsmCollection("collection")); final QName expected = new QName(TARGET_NAMESPACE, "collection", TARGET_NAMESPACE_PREFIX); Assert.assertEquals(expected, ... | @Override public QName getElementName(final String name, final boolean isReference) { return new QName(TARGET_NAMESPACE, Uml2XsdTools.camelCase(name), TARGET_NAMESPACE_PREFIX); } | PluginForREST implements Uml2XsdPlugin { @Override public QName getElementName(final String name, final boolean isReference) { return new QName(TARGET_NAMESPACE, Uml2XsdTools.camelCase(name), TARGET_NAMESPACE_PREFIX); } } | PluginForREST implements Uml2XsdPlugin { @Override public QName getElementName(final String name, final boolean isReference) { return new QName(TARGET_NAMESPACE, Uml2XsdTools.camelCase(name), TARGET_NAMESPACE_PREFIX); } } | PluginForREST implements Uml2XsdPlugin { @Override public QName getElementName(final String name, final boolean isReference) { return new QName(TARGET_NAMESPACE, Uml2XsdTools.camelCase(name), TARGET_NAMESPACE_PREFIX); } @Override Map<String, String> declarePrefixMappings(); @Override QName getElementName(final String ... | PluginForREST implements Uml2XsdPlugin { @Override public QName getElementName(final String name, final boolean isReference) { return new QName(TARGET_NAMESPACE, Uml2XsdTools.camelCase(name), TARGET_NAMESPACE_PREFIX); } @Override Map<String, String> declarePrefixMappings(); @Override QName getElementName(final String ... |
@SuppressWarnings("unchecked") @Test public void testProcessZip() throws IOException, NoSuchFieldException, IllegalAccessException { Handler<org.slc.sli.ingestion.Resource, String> handler = Mockito.mock(Handler.class); ReportStats rs = Mockito.mock(ReportStats.class); Mockito.when(rs.hasErrors()).thenReturn(false); Ab... | public void processZip(File zipFile, ReportStats reportStats) { messageReport.info(reportStats, new FileSource(zipFile.getName()), ValidationMessageCode.VALIDATION_0005, zipFile.getAbsolutePath()); FileResource zipFileResource = new FileResource(zipFile.getAbsolutePath()); String ctlFile = zipFileHandler.handle(zipFile... | ValidationController { public void processZip(File zipFile, ReportStats reportStats) { messageReport.info(reportStats, new FileSource(zipFile.getName()), ValidationMessageCode.VALIDATION_0005, zipFile.getAbsolutePath()); FileResource zipFileResource = new FileResource(zipFile.getAbsolutePath()); String ctlFile = zipFil... | ValidationController { public void processZip(File zipFile, ReportStats reportStats) { messageReport.info(reportStats, new FileSource(zipFile.getName()), ValidationMessageCode.VALIDATION_0005, zipFile.getAbsolutePath()); FileResource zipFileResource = new FileResource(zipFile.getAbsolutePath()); String ctlFile = zipFil... | ValidationController { public void processZip(File zipFile, ReportStats reportStats) { messageReport.info(reportStats, new FileSource(zipFile.getName()), ValidationMessageCode.VALIDATION_0005, zipFile.getAbsolutePath()); FileResource zipFileResource = new FileResource(zipFile.getAbsolutePath()); String ctlFile = zipFil... | ValidationController { public void processZip(File zipFile, ReportStats reportStats) { messageReport.info(reportStats, new FileSource(zipFile.getName()), ValidationMessageCode.VALIDATION_0005, zipFile.getAbsolutePath()); FileResource zipFileResource = new FileResource(zipFile.getAbsolutePath()); String ctlFile = zipFil... |
@Test public void testGetTargetNamespace() throws Exception { Assert.assertEquals(TARGET_NAMESPACE, pluginForREST.getTargetNamespace()); } | @Override public String getTargetNamespace() { return TARGET_NAMESPACE; } | PluginForREST implements Uml2XsdPlugin { @Override public String getTargetNamespace() { return TARGET_NAMESPACE; } } | PluginForREST implements Uml2XsdPlugin { @Override public String getTargetNamespace() { return TARGET_NAMESPACE; } } | PluginForREST implements Uml2XsdPlugin { @Override public String getTargetNamespace() { return TARGET_NAMESPACE; } @Override Map<String, String> declarePrefixMappings(); @Override QName getElementName(final String name, final boolean isReference); @Override QName getElementType(final String name, final boolean isAssoc... | PluginForREST implements Uml2XsdPlugin { @Override public String getTargetNamespace() { return TARGET_NAMESPACE; } @Override Map<String, String> declarePrefixMappings(); @Override QName getElementName(final String name, final boolean isReference); @Override QName getElementType(final String name, final boolean isAssoc... |
@Test public void testGetTypeName() throws Exception { final QName expected = new QName(TARGET_NAMESPACE, "test", TARGET_NAMESPACE_PREFIX); Assert.assertEquals(expected, pluginForREST.getTypeName("test")); } | @Override public QName getTypeName(final String name) { return new QName(TARGET_NAMESPACE, name, TARGET_NAMESPACE_PREFIX); } | PluginForREST implements Uml2XsdPlugin { @Override public QName getTypeName(final String name) { return new QName(TARGET_NAMESPACE, name, TARGET_NAMESPACE_PREFIX); } } | PluginForREST implements Uml2XsdPlugin { @Override public QName getTypeName(final String name) { return new QName(TARGET_NAMESPACE, name, TARGET_NAMESPACE_PREFIX); } } | PluginForREST implements Uml2XsdPlugin { @Override public QName getTypeName(final String name) { return new QName(TARGET_NAMESPACE, name, TARGET_NAMESPACE_PREFIX); } @Override Map<String, String> declarePrefixMappings(); @Override QName getElementName(final String name, final boolean isReference); @Override QName getE... | PluginForREST implements Uml2XsdPlugin { @Override public QName getTypeName(final String name) { return new QName(TARGET_NAMESPACE, name, TARGET_NAMESPACE_PREFIX); } @Override Map<String, String> declarePrefixMappings(); @Override QName getElementName(final String name, final boolean isReference); @Override QName getE... |
@Test public void testIsAttributeFormDefaultQualified() throws Exception { Assert.assertFalse(pluginForREST.isAttributeFormDefaultQualified()); } | @Override public boolean isAttributeFormDefaultQualified() { return false; } | PluginForREST implements Uml2XsdPlugin { @Override public boolean isAttributeFormDefaultQualified() { return false; } } | PluginForREST implements Uml2XsdPlugin { @Override public boolean isAttributeFormDefaultQualified() { return false; } } | PluginForREST implements Uml2XsdPlugin { @Override public boolean isAttributeFormDefaultQualified() { return false; } @Override Map<String, String> declarePrefixMappings(); @Override QName getElementName(final String name, final boolean isReference); @Override QName getElementType(final String name, final boolean isAs... | PluginForREST implements Uml2XsdPlugin { @Override public boolean isAttributeFormDefaultQualified() { return false; } @Override Map<String, String> declarePrefixMappings(); @Override QName getElementName(final String name, final boolean isReference); @Override QName getElementType(final String name, final boolean isAs... |
@Test public void testIsElementFormDefaultQualified() throws Exception { Assert.assertTrue(pluginForREST.isElementFormDefaultQualified()); } | @Override public boolean isElementFormDefaultQualified() { return true; } | PluginForREST implements Uml2XsdPlugin { @Override public boolean isElementFormDefaultQualified() { return true; } } | PluginForREST implements Uml2XsdPlugin { @Override public boolean isElementFormDefaultQualified() { return true; } } | PluginForREST implements Uml2XsdPlugin { @Override public boolean isElementFormDefaultQualified() { return true; } @Override Map<String, String> declarePrefixMappings(); @Override QName getElementName(final String name, final boolean isReference); @Override QName getElementType(final String name, final boolean isAssoc... | PluginForREST implements Uml2XsdPlugin { @Override public boolean isElementFormDefaultQualified() { return true; } @Override Map<String, String> declarePrefixMappings(); @Override QName getElementName(final String name, final boolean isReference); @Override QName getElementType(final String name, final boolean isAssoc... |
@Test public void testIsEnabled() throws Exception { final QName test = new QName(""); Assert.assertFalse(pluginForREST.isEnabled(test)); } | @Override public boolean isEnabled(final QName name) { return false; } | PluginForREST implements Uml2XsdPlugin { @Override public boolean isEnabled(final QName name) { return false; } } | PluginForREST implements Uml2XsdPlugin { @Override public boolean isEnabled(final QName name) { return false; } } | PluginForREST implements Uml2XsdPlugin { @Override public boolean isEnabled(final QName name) { return false; } @Override Map<String, String> declarePrefixMappings(); @Override QName getElementName(final String name, final boolean isReference); @Override QName getElementType(final String name, final boolean isAssociat... | PluginForREST implements Uml2XsdPlugin { @Override public boolean isEnabled(final QName name) { return false; } @Override Map<String, String> declarePrefixMappings(); @Override QName getElementName(final String name, final boolean isReference); @Override QName getElementType(final String name, final boolean isAssociat... |
@Test public void testWriteAppInfo() throws Exception { final Uml2XsdPluginWriter mockWriter = Mockito.mock(Uml2XsdPluginWriter.class); pluginForREST.writeAppInfo(Mockito.mock(TaggedValue.class), Mockito.mock(ModelIndex.class), mockWriter); Mockito.verify(mockWriter, Mockito.never()).end(); } | @Override public void writeAppInfo(final TaggedValue taggedValue, final ModelIndex lookup, final Uml2XsdPluginWriter xsw) { } | PluginForREST implements Uml2XsdPlugin { @Override public void writeAppInfo(final TaggedValue taggedValue, final ModelIndex lookup, final Uml2XsdPluginWriter xsw) { } } | PluginForREST implements Uml2XsdPlugin { @Override public void writeAppInfo(final TaggedValue taggedValue, final ModelIndex lookup, final Uml2XsdPluginWriter xsw) { } } | PluginForREST implements Uml2XsdPlugin { @Override public void writeAppInfo(final TaggedValue taggedValue, final ModelIndex lookup, final Uml2XsdPluginWriter xsw) { } @Override Map<String, String> declarePrefixMappings(); @Override QName getElementName(final String name, final boolean isReference); @Override QName get... | PluginForREST implements Uml2XsdPlugin { @Override public void writeAppInfo(final TaggedValue taggedValue, final ModelIndex lookup, final Uml2XsdPluginWriter xsw) { } @Override Map<String, String> declarePrefixMappings(); @Override QName getElementName(final String name, final boolean isReference); @Override QName get... |
@Test public void testWriteAssociation() throws Exception { final Multiplicity multiplicity = new Multiplicity(new Range(Occurs.ZERO, Occurs.ONE)); final Identifier id = Identifier.fromString("1234"); final AssociationEnd mockEnd = new AssociationEnd(multiplicity, "test", true, id, "test"); final ClassType mockClassTyp... | @Override public void writeAssociation(final ClassType complexType, final AssociationEnd end, final ModelIndex model, final Uml2XsdPluginWriter xsw) { if (end.isNavigable()) { writeEmbedded(complexType, end, model, xsw); } } | PluginForREST implements Uml2XsdPlugin { @Override public void writeAssociation(final ClassType complexType, final AssociationEnd end, final ModelIndex model, final Uml2XsdPluginWriter xsw) { if (end.isNavigable()) { writeEmbedded(complexType, end, model, xsw); } } } | PluginForREST implements Uml2XsdPlugin { @Override public void writeAssociation(final ClassType complexType, final AssociationEnd end, final ModelIndex model, final Uml2XsdPluginWriter xsw) { if (end.isNavigable()) { writeEmbedded(complexType, end, model, xsw); } } } | PluginForREST implements Uml2XsdPlugin { @Override public void writeAssociation(final ClassType complexType, final AssociationEnd end, final ModelIndex model, final Uml2XsdPluginWriter xsw) { if (end.isNavigable()) { writeEmbedded(complexType, end, model, xsw); } } @Override Map<String, String> declarePrefixMappings()... | PluginForREST implements Uml2XsdPlugin { @Override public void writeAssociation(final ClassType complexType, final AssociationEnd end, final ModelIndex model, final Uml2XsdPluginWriter xsw) { if (end.isNavigable()) { writeEmbedded(complexType, end, model, xsw); } } @Override Map<String, String> declarePrefixMappings()... |
@Test public void testWriteReference() throws Exception { final Multiplicity multiplicity = new Multiplicity(new Range(Occurs.ZERO, Occurs.ONE)); final Identifier id = Identifier.fromString("1234"); final List<TaggedValue> taggedValueList = new ArrayList<TaggedValue>(); final TaggedValue mockTaggedValue = new TaggedVal... | public void writeReference(final ClassType complexType, final AssociationEnd end, final ModelIndex model, final Uml2XsdPluginWriter xsw) { xsw.element(); try { xsw.elementName(new QName(PluginHelpers.getMongoName(end, model))); xsw.type(WxsNamespace.STRING); xsw.minOccurs(end.getMultiplicity().getRange().getLower()); x... | PluginForREST implements Uml2XsdPlugin { public void writeReference(final ClassType complexType, final AssociationEnd end, final ModelIndex model, final Uml2XsdPluginWriter xsw) { xsw.element(); try { xsw.elementName(new QName(PluginHelpers.getMongoName(end, model))); xsw.type(WxsNamespace.STRING); xsw.minOccurs(end.ge... | PluginForREST implements Uml2XsdPlugin { public void writeReference(final ClassType complexType, final AssociationEnd end, final ModelIndex model, final Uml2XsdPluginWriter xsw) { xsw.element(); try { xsw.elementName(new QName(PluginHelpers.getMongoName(end, model))); xsw.type(WxsNamespace.STRING); xsw.minOccurs(end.ge... | PluginForREST implements Uml2XsdPlugin { public void writeReference(final ClassType complexType, final AssociationEnd end, final ModelIndex model, final Uml2XsdPluginWriter xsw) { xsw.element(); try { xsw.elementName(new QName(PluginHelpers.getMongoName(end, model))); xsw.type(WxsNamespace.STRING); xsw.minOccurs(end.ge... | PluginForREST implements Uml2XsdPlugin { public void writeReference(final ClassType complexType, final AssociationEnd end, final ModelIndex model, final Uml2XsdPluginWriter xsw) { xsw.element(); try { xsw.elementName(new QName(PluginHelpers.getMongoName(end, model))); xsw.type(WxsNamespace.STRING); xsw.minOccurs(end.ge... |
@Test public void testWriteTopLevelElement() throws Exception { final Type mockType = Mockito.mock(Type.class); final PsmDocument<Type> mockClassType = new PsmDocument<Type>(mockType, new PsmResource("resource"), new PsmCollection("collection")); final ModelIndex mockIndex = Mockito.mock(ModelIndex.class); final Uml2Xs... | @Override public void writeTopLevelElement(final PsmDocument<Type> classType, final ModelIndex model, final Uml2XsdPluginWriter xsw) { final Type elementType = classType.getType(); final QName elementName = getElementName(classType); final String ns = elementName.getNamespaceURI(); final QName elementList = new QName(n... | PluginForREST implements Uml2XsdPlugin { @Override public void writeTopLevelElement(final PsmDocument<Type> classType, final ModelIndex model, final Uml2XsdPluginWriter xsw) { final Type elementType = classType.getType(); final QName elementName = getElementName(classType); final String ns = elementName.getNamespaceURI... | PluginForREST implements Uml2XsdPlugin { @Override public void writeTopLevelElement(final PsmDocument<Type> classType, final ModelIndex model, final Uml2XsdPluginWriter xsw) { final Type elementType = classType.getType(); final QName elementName = getElementName(classType); final String ns = elementName.getNamespaceURI... | PluginForREST implements Uml2XsdPlugin { @Override public void writeTopLevelElement(final PsmDocument<Type> classType, final ModelIndex model, final Uml2XsdPluginWriter xsw) { final Type elementType = classType.getType(); final QName elementName = getElementName(classType); final String ns = elementName.getNamespaceURI... | PluginForREST implements Uml2XsdPlugin { @Override public void writeTopLevelElement(final PsmDocument<Type> classType, final ModelIndex model, final Uml2XsdPluginWriter xsw) { final Type elementType = classType.getType(); final QName elementName = getElementName(classType); final String ns = elementName.getNamespaceURI... |
@Test public void testCamelCase() throws Exception { String expected; String actual; expected = "myTest"; actual = Uml2XsdTools.camelCase("MyTest"); Assert.assertEquals(expected, actual); expected = "myTest"; actual = Uml2XsdTools.camelCase("myTest"); Assert.assertEquals(expected, actual); } | public static final String camelCase(final String name) { return name.substring(0, 1).toLowerCase().concat(name.substring(1)); } | Uml2XsdTools { public static final String camelCase(final String name) { return name.substring(0, 1).toLowerCase().concat(name.substring(1)); } } | Uml2XsdTools { public static final String camelCase(final String name) { return name.substring(0, 1).toLowerCase().concat(name.substring(1)); } } | Uml2XsdTools { public static final String camelCase(final String name) { return name.substring(0, 1).toLowerCase().concat(name.substring(1)); } static final String camelCase(final String name); } | Uml2XsdTools { public static final String camelCase(final String name) { return name.substring(0, 1).toLowerCase().concat(name.substring(1)); } static final String camelCase(final String name); } |
@Test public void testValidatorInValid() throws IOException, NoSuchFieldException, IllegalAccessException { Resource xmlResource = new ClassPathResource("emptyXml/InterchangeStudent.xml"); File xmlFile = xmlResource.getFile(); IngestionFileEntry ife = new IngestionFileEntry(xmlFile.getParentFile().getAbsolutePath(), Fi... | public void processValidators(ControlFile cfile, ReportStats reportStats) { boolean isValid = false; for (IngestionFileEntry ife : cfile.getFileEntries()) { if (ife.isValid()) { messageReport.info(reportStats, new XmlFileSource(ife), ValidationMessageCode.VALIDATION_0002, ife.getFileName()); isValid = complexValidator.... | ValidationController { public void processValidators(ControlFile cfile, ReportStats reportStats) { boolean isValid = false; for (IngestionFileEntry ife : cfile.getFileEntries()) { if (ife.isValid()) { messageReport.info(reportStats, new XmlFileSource(ife), ValidationMessageCode.VALIDATION_0002, ife.getFileName()); isVa... | ValidationController { public void processValidators(ControlFile cfile, ReportStats reportStats) { boolean isValid = false; for (IngestionFileEntry ife : cfile.getFileEntries()) { if (ife.isValid()) { messageReport.info(reportStats, new XmlFileSource(ife), ValidationMessageCode.VALIDATION_0002, ife.getFileName()); isVa... | ValidationController { public void processValidators(ControlFile cfile, ReportStats reportStats) { boolean isValid = false; for (IngestionFileEntry ife : cfile.getFileEntries()) { if (ife.isValid()) { messageReport.info(reportStats, new XmlFileSource(ife), ValidationMessageCode.VALIDATION_0002, ife.getFileName()); isVa... | ValidationController { public void processValidators(ControlFile cfile, ReportStats reportStats) { boolean isValid = false; for (IngestionFileEntry ife : cfile.getFileEntries()) { if (ife.isValid()) { messageReport.info(reportStats, new XmlFileSource(ife), ValidationMessageCode.VALIDATION_0002, ife.getFileName()); isVa... |
@Test public void testWriteDocumentation() throws Exception { final Taggable mockTaggable = Mockito.mock(Taggable.class); final ModelIndex mockIndex = Mockito.mock(ModelIndex.class); final Uml2XsdPluginWriter mockWriter = Mockito.mock(Uml2XsdPluginWriter.class); final List<TaggedValue> taggedValueList = new ArrayList<T... | public static final void writeDocumentation(final Taggable taggable, final ModelIndex model, final Uml2XsdPluginWriter xsw) { for (final TaggedValue taggedValue : taggable.getTaggedValues()) { final TagDefinition tagDefinition = model.getTagDefinition(taggedValue.getTagDefinition()); if (TagName.DOCUMENTATION.equals(ta... | PluginHelpers { public static final void writeDocumentation(final Taggable taggable, final ModelIndex model, final Uml2XsdPluginWriter xsw) { for (final TaggedValue taggedValue : taggable.getTaggedValues()) { final TagDefinition tagDefinition = model.getTagDefinition(taggedValue.getTagDefinition()); if (TagName.DOCUMEN... | PluginHelpers { public static final void writeDocumentation(final Taggable taggable, final ModelIndex model, final Uml2XsdPluginWriter xsw) { for (final TaggedValue taggedValue : taggable.getTaggedValues()) { final TagDefinition tagDefinition = model.getTagDefinition(taggedValue.getTagDefinition()); if (TagName.DOCUMEN... | PluginHelpers { public static final void writeDocumentation(final Taggable taggable, final ModelIndex model, final Uml2XsdPluginWriter xsw) { for (final TaggedValue taggedValue : taggable.getTaggedValues()) { final TagDefinition tagDefinition = model.getTagDefinition(taggedValue.getTagDefinition()); if (TagName.DOCUMEN... | PluginHelpers { public static final void writeDocumentation(final Taggable taggable, final ModelIndex model, final Uml2XsdPluginWriter xsw) { for (final TaggedValue taggedValue : taggable.getTaggedValues()) { final TagDefinition tagDefinition = model.getTagDefinition(taggedValue.getTagDefinition()); if (TagName.DOCUMEN... |
@Test public void testIsMongoNavigable() throws Exception { final Multiplicity multiplicity = new Multiplicity(new Range(Occurs.ZERO, Occurs.ONE)); final List<TaggedValue> taggedValueList = new ArrayList<TaggedValue>(); final Identifier id = Identifier.fromString("1234"); taggedValueList.add(new TaggedValue("true", id)... | public static final boolean isMongoNavigable(final AssociationEnd associationEnd, final ModelIndex model) { return TaggedValueHelper.getBooleanTag(TagName.MONGO_NAVIGABLE, associationEnd, model, false); } | PluginHelpers { public static final boolean isMongoNavigable(final AssociationEnd associationEnd, final ModelIndex model) { return TaggedValueHelper.getBooleanTag(TagName.MONGO_NAVIGABLE, associationEnd, model, false); } } | PluginHelpers { public static final boolean isMongoNavigable(final AssociationEnd associationEnd, final ModelIndex model) { return TaggedValueHelper.getBooleanTag(TagName.MONGO_NAVIGABLE, associationEnd, model, false); } } | PluginHelpers { public static final boolean isMongoNavigable(final AssociationEnd associationEnd, final ModelIndex model) { return TaggedValueHelper.getBooleanTag(TagName.MONGO_NAVIGABLE, associationEnd, model, false); } static final void writeDocumentation(final Taggable taggable, final ModelIndex model,
... | PluginHelpers { public static final boolean isMongoNavigable(final AssociationEnd associationEnd, final ModelIndex model) { return TaggedValueHelper.getBooleanTag(TagName.MONGO_NAVIGABLE, associationEnd, model, false); } static final void writeDocumentation(final Taggable taggable, final ModelIndex model,
... |
@Test public void testHasMongoName() throws Exception { final Multiplicity multiplicity = new Multiplicity(new Range(Occurs.ZERO, Occurs.ONE)); final List<TaggedValue> taggedValueList = new ArrayList<TaggedValue>(); final Identifier id = Identifier.fromString("1234"); taggedValueList.add(new TaggedValue(TagName.MONGO_N... | public static final boolean hasMongoName(final Feature feature, final ModelIndex model) { return TaggedValueHelper.hasTag(TagName.MONGO_NAME, feature, model); } | PluginHelpers { public static final boolean hasMongoName(final Feature feature, final ModelIndex model) { return TaggedValueHelper.hasTag(TagName.MONGO_NAME, feature, model); } } | PluginHelpers { public static final boolean hasMongoName(final Feature feature, final ModelIndex model) { return TaggedValueHelper.hasTag(TagName.MONGO_NAME, feature, model); } } | PluginHelpers { public static final boolean hasMongoName(final Feature feature, final ModelIndex model) { return TaggedValueHelper.hasTag(TagName.MONGO_NAME, feature, model); } static final void writeDocumentation(final Taggable taggable, final ModelIndex model,
final Uml2XsdPluginWriter xsw); static final... | PluginHelpers { public static final boolean hasMongoName(final Feature feature, final ModelIndex model) { return TaggedValueHelper.hasTag(TagName.MONGO_NAME, feature, model); } static final void writeDocumentation(final Taggable taggable, final ModelIndex model,
final Uml2XsdPluginWriter xsw); static final... |
@Test public void testGetMongoName() throws Exception { final Multiplicity multiplicity = new Multiplicity(new Range(Occurs.ZERO, Occurs.ONE)); final List<TaggedValue> taggedValueList = new ArrayList<TaggedValue>(); final Identifier id = Identifier.fromString("1234"); taggedValueList.add(new TaggedValue("CollectionName... | public static final String getMongoName(final Feature feature, final ModelIndex model) { return TaggedValueHelper.getStringTag(TagName.MONGO_NAME, feature, model, null); } | PluginHelpers { public static final String getMongoName(final Feature feature, final ModelIndex model) { return TaggedValueHelper.getStringTag(TagName.MONGO_NAME, feature, model, null); } } | PluginHelpers { public static final String getMongoName(final Feature feature, final ModelIndex model) { return TaggedValueHelper.getStringTag(TagName.MONGO_NAME, feature, model, null); } } | PluginHelpers { public static final String getMongoName(final Feature feature, final ModelIndex model) { return TaggedValueHelper.getStringTag(TagName.MONGO_NAME, feature, model, null); } static final void writeDocumentation(final Taggable taggable, final ModelIndex model,
final Uml2XsdPluginWriter xsw); s... | PluginHelpers { public static final String getMongoName(final Feature feature, final ModelIndex model) { return TaggedValueHelper.getStringTag(TagName.MONGO_NAME, feature, model, null); } static final void writeDocumentation(final Taggable taggable, final ModelIndex model,
final Uml2XsdPluginWriter xsw); s... |
@Test public void testAnnotation() throws Exception { uml2XsdPluginWriterAdapter.annotation(); Mockito.verify(mockWriter).writeStartElement(prefix, "annotation", WxsNamespace.URI); } | @Override public void annotation() { try { xsw.writeStartElement(prefix, "annotation", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void annotation() { try { xsw.writeStartElement(prefix, "annotation", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void annotation() { try { xsw.writeStartElement(prefix, "annotation", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String prefix)... | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void annotation() { try { xsw.writeStartElement(prefix, "annotation", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String prefix)... | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void annotation() { try { xsw.writeStartElement(prefix, "annotation", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String prefix)... |
@Test public void testAppinfo() throws Exception { uml2XsdPluginWriterAdapter.appinfo(); Mockito.verify(mockWriter).writeStartElement(prefix, "appinfo", WxsNamespace.URI); } | @Override public void appinfo() { try { xsw.writeStartElement(prefix, "appinfo", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void appinfo() { try { xsw.writeStartElement(prefix, "appinfo", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void appinfo() { try { xsw.writeStartElement(prefix, "appinfo", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String prefix); } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void appinfo() { try { xsw.writeStartElement(prefix, "appinfo", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String prefix); @Ove... | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void appinfo() { try { xsw.writeStartElement(prefix, "appinfo", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String prefix); @Ove... |
@Test public void testBegin() throws Exception { uml2XsdPluginWriterAdapter.begin(prefix, "test", "testns"); Mockito.verify(mockWriter).writeStartElement(prefix, "test", "testns"); } | @Override public void begin(final String prefix, final String localName, final String namespace) { try { xsw.writeStartElement(prefix, localName, namespace); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void begin(final String prefix, final String localName, final String namespace) { try { xsw.writeStartElement(prefix, localName, namespace); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void begin(final String prefix, final String localName, final String namespace) { try { xsw.writeStartElement(prefix, localName, namespace); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAda... | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void begin(final String prefix, final String localName, final String namespace) { try { xsw.writeStartElement(prefix, localName, namespace); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAda... | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void begin(final String prefix, final String localName, final String namespace) { try { xsw.writeStartElement(prefix, localName, namespace); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAda... |
@Test public void testCharacters() throws Exception { uml2XsdPluginWriterAdapter.characters("test"); Mockito.verify(mockWriter).writeCharacters("test"); } | @Override public void characters(final String text) { try { xsw.writeCharacters(text); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void characters(final String text) { try { xsw.writeCharacters(text); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void characters(final String text) { try { xsw.writeCharacters(text); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String prefix); } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void characters(final String text) { try { xsw.writeCharacters(text); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String prefix); @Override void an... | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void characters(final String text) { try { xsw.writeCharacters(text); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String prefix); @Override void an... |
@Test public void testChoice() throws Exception { uml2XsdPluginWriterAdapter.choice(); Mockito.verify(mockWriter).writeStartElement(prefix, "choice", WxsNamespace.URI); } | @Override public void choice() { try { xsw.writeStartElement(prefix, "choice", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void choice() { try { xsw.writeStartElement(prefix, "choice", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void choice() { try { xsw.writeStartElement(prefix, "choice", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String prefix); } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void choice() { try { xsw.writeStartElement(prefix, "choice", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String prefix); @Overr... | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void choice() { try { xsw.writeStartElement(prefix, "choice", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String prefix); @Overr... |
@Test public void testComment() throws Exception { uml2XsdPluginWriterAdapter.comment("test"); Mockito.verify(mockWriter).writeComment("test"); } | @Override public void comment(final String data) { try { xsw.writeComment(data); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void comment(final String data) { try { xsw.writeComment(data); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void comment(final String data) { try { xsw.writeComment(data); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String prefix); } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void comment(final String data) { try { xsw.writeComment(data); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String prefix); @Override void annotati... | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void comment(final String data) { try { xsw.writeComment(data); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String prefix); @Override void annotati... |
@Test public void testValidatorValid() throws IOException, NoSuchFieldException, IllegalAccessException { Resource xmlResource = new ClassPathResource("test/InterchangeStudent.xml"); File xmlFile = xmlResource.getFile(); IngestionFileEntry ife = new IngestionFileEntry(xmlFile.getParentFile().getAbsolutePath(), FileForm... | public void processValidators(ControlFile cfile, ReportStats reportStats) { boolean isValid = false; for (IngestionFileEntry ife : cfile.getFileEntries()) { if (ife.isValid()) { messageReport.info(reportStats, new XmlFileSource(ife), ValidationMessageCode.VALIDATION_0002, ife.getFileName()); isValid = complexValidator.... | ValidationController { public void processValidators(ControlFile cfile, ReportStats reportStats) { boolean isValid = false; for (IngestionFileEntry ife : cfile.getFileEntries()) { if (ife.isValid()) { messageReport.info(reportStats, new XmlFileSource(ife), ValidationMessageCode.VALIDATION_0002, ife.getFileName()); isVa... | ValidationController { public void processValidators(ControlFile cfile, ReportStats reportStats) { boolean isValid = false; for (IngestionFileEntry ife : cfile.getFileEntries()) { if (ife.isValid()) { messageReport.info(reportStats, new XmlFileSource(ife), ValidationMessageCode.VALIDATION_0002, ife.getFileName()); isVa... | ValidationController { public void processValidators(ControlFile cfile, ReportStats reportStats) { boolean isValid = false; for (IngestionFileEntry ife : cfile.getFileEntries()) { if (ife.isValid()) { messageReport.info(reportStats, new XmlFileSource(ife), ValidationMessageCode.VALIDATION_0002, ife.getFileName()); isVa... | ValidationController { public void processValidators(ControlFile cfile, ReportStats reportStats) { boolean isValid = false; for (IngestionFileEntry ife : cfile.getFileEntries()) { if (ife.isValid()) { messageReport.info(reportStats, new XmlFileSource(ife), ValidationMessageCode.VALIDATION_0002, ife.getFileName()); isVa... |
@Test public void testComplexType() throws Exception { uml2XsdPluginWriterAdapter.complexType(); Mockito.verify(mockWriter).writeStartElement(prefix, "complexType", WxsNamespace.URI); } | @Override public void complexType() { try { xsw.writeStartElement(prefix, "complexType", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void complexType() { try { xsw.writeStartElement(prefix, "complexType", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void complexType() { try { xsw.writeStartElement(prefix, "complexType", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String prefi... | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void complexType() { try { xsw.writeStartElement(prefix, "complexType", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String prefi... | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void complexType() { try { xsw.writeStartElement(prefix, "complexType", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String prefi... |
@Test public void testDocumentation() throws Exception { uml2XsdPluginWriterAdapter.documentation(); Mockito.verify(mockWriter).writeStartElement(prefix, "documentation", WxsNamespace.URI); } | @Override public void documentation() { try { xsw.writeStartElement(prefix, "documentation", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void documentation() { try { xsw.writeStartElement(prefix, "documentation", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void documentation() { try { xsw.writeStartElement(prefix, "documentation", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String p... | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void documentation() { try { xsw.writeStartElement(prefix, "documentation", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String p... | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void documentation() { try { xsw.writeStartElement(prefix, "documentation", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String p... |
@Test public void testElement() throws Exception { uml2XsdPluginWriterAdapter.element(); Mockito.verify(mockWriter).writeStartElement(prefix, "element", WxsNamespace.URI); } | @Override public void element() { try { xsw.writeStartElement(prefix, "element", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void element() { try { xsw.writeStartElement(prefix, "element", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void element() { try { xsw.writeStartElement(prefix, "element", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String prefix); } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void element() { try { xsw.writeStartElement(prefix, "element", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String prefix); @Ove... | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void element() { try { xsw.writeStartElement(prefix, "element", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String prefix); @Ove... |
@Test public void testElementName() throws Exception { final QName qName = new QName("test"); uml2XsdPluginWriterAdapter.elementName(qName); Mockito.verify(mockWriter).writeAttribute("name", "test"); } | @Override public void elementName(final QName name) { try { xsw.writeAttribute("name", name.getLocalPart()); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void elementName(final QName name) { try { xsw.writeAttribute("name", name.getLocalPart()); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void elementName(final QName name) { try { xsw.writeAttribute("name", name.getLocalPart()); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String pref... | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void elementName(final QName name) { try { xsw.writeAttribute("name", name.getLocalPart()); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String pref... | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void elementName(final QName name) { try { xsw.writeAttribute("name", name.getLocalPart()); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String pref... |
@Test public void testEnd() throws Exception { uml2XsdPluginWriterAdapter.end(); Mockito.verify(mockWriter).writeEndElement(); } | @Override public void end() { try { xsw.writeEndElement(); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void end() { try { xsw.writeEndElement(); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void end() { try { xsw.writeEndElement(); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String prefix); } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void end() { try { xsw.writeEndElement(); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String prefix); @Override void annotation(); @Override void a... | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void end() { try { xsw.writeEndElement(); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String prefix); @Override void annotation(); @Override void a... |
@Test public void testMaxOccurs() throws Exception { uml2XsdPluginWriterAdapter.maxOccurs(Occurs.ONE); Mockito.verifyZeroInteractions(mockWriter); uml2XsdPluginWriterAdapter.maxOccurs(Occurs.UNBOUNDED); Mockito.verify(mockWriter).writeAttribute(XsdAttributeName.MAX_OCCURS.getLocalName(), "unbounded"); uml2XsdPluginWrit... | @Override public void maxOccurs(final Occurs value) { if (!value.equals(Occurs.ONE)) { try { xsw.writeAttribute(XsdAttributeName.MAX_OCCURS.getLocalName(), toString(value)); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void maxOccurs(final Occurs value) { if (!value.equals(Occurs.ONE)) { try { xsw.writeAttribute(XsdAttributeName.MAX_OCCURS.getLocalName(), toString(value)); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } } } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void maxOccurs(final Occurs value) { if (!value.equals(Occurs.ONE)) { try { xsw.writeAttribute(XsdAttributeName.MAX_OCCURS.getLocalName(), toString(value)); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } } Uml2... | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void maxOccurs(final Occurs value) { if (!value.equals(Occurs.ONE)) { try { xsw.writeAttribute(XsdAttributeName.MAX_OCCURS.getLocalName(), toString(value)); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } } Uml2... | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void maxOccurs(final Occurs value) { if (!value.equals(Occurs.ONE)) { try { xsw.writeAttribute(XsdAttributeName.MAX_OCCURS.getLocalName(), toString(value)); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } } Uml2... |
@Test public void testMinOccurs() throws Exception { uml2XsdPluginWriterAdapter.minOccurs(Occurs.ONE); Mockito.verifyZeroInteractions(mockWriter); uml2XsdPluginWriterAdapter.minOccurs(Occurs.UNBOUNDED); Mockito.verify(mockWriter).writeAttribute(XsdAttributeName.MIN_OCCURS.getLocalName(), "unbounded"); uml2XsdPluginWrit... | @Override public void minOccurs(final Occurs value) { if (!value.equals(Occurs.ONE)) { try { xsw.writeAttribute(XsdAttributeName.MIN_OCCURS.getLocalName(), toString(value)); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void minOccurs(final Occurs value) { if (!value.equals(Occurs.ONE)) { try { xsw.writeAttribute(XsdAttributeName.MIN_OCCURS.getLocalName(), toString(value)); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } } } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void minOccurs(final Occurs value) { if (!value.equals(Occurs.ONE)) { try { xsw.writeAttribute(XsdAttributeName.MIN_OCCURS.getLocalName(), toString(value)); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } } Uml2... | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void minOccurs(final Occurs value) { if (!value.equals(Occurs.ONE)) { try { xsw.writeAttribute(XsdAttributeName.MIN_OCCURS.getLocalName(), toString(value)); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } } Uml2... | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void minOccurs(final Occurs value) { if (!value.equals(Occurs.ONE)) { try { xsw.writeAttribute(XsdAttributeName.MIN_OCCURS.getLocalName(), toString(value)); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } } Uml2... |
@Test public void testRef() throws Exception { final NamespaceContext mockNamespaceContext = Mockito.mock(NamespaceContext.class); Mockito.when(mockWriter.getNamespaceContext()).thenReturn(mockNamespaceContext); Mockito.when(mockNamespaceContext.getPrefix(Matchers.anyString())).thenReturn("sli"); final QName qName = ne... | @Override public void ref(final QName name) { try { if (name.getNamespaceURI().equals(WxsNamespace.URI)) { xsw.writeAttribute("ref", prefix.concat(":").concat(name.getLocalPart())); } else { xsw.writeAttribute("ref", typeLexicalName(name, xsw)); } } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(... | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void ref(final QName name) { try { if (name.getNamespaceURI().equals(WxsNamespace.URI)) { xsw.writeAttribute("ref", prefix.concat(":").concat(name.getLocalPart())); } else { xsw.writeAttribute("ref", typeLexicalName(name, xsw)); } } catch (fin... | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void ref(final QName name) { try { if (name.getNamespaceURI().equals(WxsNamespace.URI)) { xsw.writeAttribute("ref", prefix.concat(":").concat(name.getLocalPart())); } else { xsw.writeAttribute("ref", typeLexicalName(name, xsw)); } } catch (fin... | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void ref(final QName name) { try { if (name.getNamespaceURI().equals(WxsNamespace.URI)) { xsw.writeAttribute("ref", prefix.concat(":").concat(name.getLocalPart())); } else { xsw.writeAttribute("ref", typeLexicalName(name, xsw)); } } catch (fin... | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void ref(final QName name) { try { if (name.getNamespaceURI().equals(WxsNamespace.URI)) { xsw.writeAttribute("ref", prefix.concat(":").concat(name.getLocalPart())); } else { xsw.writeAttribute("ref", typeLexicalName(name, xsw)); } } catch (fin... |
@Test public void testSequence() throws Exception { uml2XsdPluginWriterAdapter.sequence(); Mockito.verify(mockWriter).writeStartElement(prefix, "sequence", WxsNamespace.URI); } | @Override public void sequence() { try { xsw.writeStartElement(prefix, "sequence", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void sequence() { try { xsw.writeStartElement(prefix, "sequence", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void sequence() { try { xsw.writeStartElement(prefix, "sequence", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String prefix); } | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void sequence() { try { xsw.writeStartElement(prefix, "sequence", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String prefix); @O... | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void sequence() { try { xsw.writeStartElement(prefix, "sequence", WxsNamespace.URI); } catch (final XMLStreamException e) { throw new XsdGenRuntimeException(e); } } Uml2XsdPluginWriterAdapter(final XMLStreamWriter xsw, final String prefix); @O... |
@Test public void testType() throws Exception { final NamespaceContext mockNamespaceContext = Mockito.mock(NamespaceContext.class); Mockito.when(mockWriter.getNamespaceContext()).thenReturn(mockNamespaceContext); Mockito.when(mockNamespaceContext.getPrefix(Matchers.anyString())).thenReturn("sli"); final QName qName = n... | @Override public void type(final QName name) { try { if (name.getNamespaceURI().equals(WxsNamespace.URI)) { xsw.writeAttribute("type", prefix.concat(":").concat(name.getLocalPart())); } else { xsw.writeAttribute("type", typeLexicalName(name, xsw)); } } catch (final XMLStreamException e) { throw new XsdGenRuntimeExcepti... | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void type(final QName name) { try { if (name.getNamespaceURI().equals(WxsNamespace.URI)) { xsw.writeAttribute("type", prefix.concat(":").concat(name.getLocalPart())); } else { xsw.writeAttribute("type", typeLexicalName(name, xsw)); } } catch (... | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void type(final QName name) { try { if (name.getNamespaceURI().equals(WxsNamespace.URI)) { xsw.writeAttribute("type", prefix.concat(":").concat(name.getLocalPart())); } else { xsw.writeAttribute("type", typeLexicalName(name, xsw)); } } catch (... | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void type(final QName name) { try { if (name.getNamespaceURI().equals(WxsNamespace.URI)) { xsw.writeAttribute("type", prefix.concat(":").concat(name.getLocalPart())); } else { xsw.writeAttribute("type", typeLexicalName(name, xsw)); } } catch (... | Uml2XsdPluginWriterAdapter implements Uml2XsdPluginWriter { @Override public void type(final QName name) { try { if (name.getNamespaceURI().equals(WxsNamespace.URI)) { xsw.writeAttribute("type", prefix.concat(":").concat(name.getLocalPart())); } else { xsw.writeAttribute("type", typeLexicalName(name, xsw)); } } catch (... |
@Test public void testInvalidProcessControlFile() throws IOException, SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { Resource ctlFileResource = new ClassPathResource(invalidControlFile); File ctlFile = ctlFileResource.getFile(); AbstractMessageReport messageReport = Mockito.... | public void processControlFile(File parentDirectoryOrZipFile, String ctlFile, ReportStats reportStats) { Source source = new ControlFileSource(ctlFile); messageReport.info(reportStats, source, ValidationMessageCode.VALIDATION_0007, ctlFile); try { ControlFile cfile = ControlFile.parse(parentDirectoryOrZipFile.getAbsolu... | ValidationController { public void processControlFile(File parentDirectoryOrZipFile, String ctlFile, ReportStats reportStats) { Source source = new ControlFileSource(ctlFile); messageReport.info(reportStats, source, ValidationMessageCode.VALIDATION_0007, ctlFile); try { ControlFile cfile = ControlFile.parse(parentDirec... | ValidationController { public void processControlFile(File parentDirectoryOrZipFile, String ctlFile, ReportStats reportStats) { Source source = new ControlFileSource(ctlFile); messageReport.info(reportStats, source, ValidationMessageCode.VALIDATION_0007, ctlFile); try { ControlFile cfile = ControlFile.parse(parentDirec... | ValidationController { public void processControlFile(File parentDirectoryOrZipFile, String ctlFile, ReportStats reportStats) { Source source = new ControlFileSource(ctlFile); messageReport.info(reportStats, source, ValidationMessageCode.VALIDATION_0007, ctlFile); try { ControlFile cfile = ControlFile.parse(parentDirec... | ValidationController { public void processControlFile(File parentDirectoryOrZipFile, String ctlFile, ReportStats reportStats) { Source source = new ControlFileSource(ctlFile); messageReport.info(reportStats, source, ValidationMessageCode.VALIDATION_0007, ctlFile); try { ControlFile cfile = ControlFile.parse(parentDirec... |
@Test public void testByFile() throws FileNotFoundException { File file = new File(filename); Uml2XsdWriter.writeSchema(documents, model, plugin, file); try { XsdReader.readSchema(file, null); } catch (AssertionError e) { Assert.fail(); } finally { file.delete(); } } | public static final void writeSchema(final List<PsmDocument<Type>> elements, final ModelIndex model, final Uml2XsdPlugin plugin, final File file) { try { final OutputStream outstream = new BufferedOutputStream(new FileOutputStream(file)); try { writeSchema(elements, model, plugin, outstream); } finally { closeQuiet(out... | Uml2XsdWriter { public static final void writeSchema(final List<PsmDocument<Type>> elements, final ModelIndex model, final Uml2XsdPlugin plugin, final File file) { try { final OutputStream outstream = new BufferedOutputStream(new FileOutputStream(file)); try { writeSchema(elements, model, plugin, outstream); } finally ... | Uml2XsdWriter { public static final void writeSchema(final List<PsmDocument<Type>> elements, final ModelIndex model, final Uml2XsdPlugin plugin, final File file) { try { final OutputStream outstream = new BufferedOutputStream(new FileOutputStream(file)); try { writeSchema(elements, model, plugin, outstream); } finally ... | Uml2XsdWriter { public static final void writeSchema(final List<PsmDocument<Type>> elements, final ModelIndex model, final Uml2XsdPlugin plugin, final File file) { try { final OutputStream outstream = new BufferedOutputStream(new FileOutputStream(file)); try { writeSchema(elements, model, plugin, outstream); } finally ... | Uml2XsdWriter { public static final void writeSchema(final List<PsmDocument<Type>> elements, final ModelIndex model, final Uml2XsdPlugin plugin, final File file) { try { final OutputStream outstream = new BufferedOutputStream(new FileOutputStream(file)); try { writeSchema(elements, model, plugin, outstream); } finally ... |
@Test public void testByString() throws FileNotFoundException { Uml2XsdWriter.writeSchema(documents, model, plugin, filename); try { XsdReader.readSchema(filename, null); } catch (AssertionError e) { Assert.fail(); } finally { File file = new File(filename); file.delete(); } } | public static final void writeSchema(final List<PsmDocument<Type>> elements, final ModelIndex model, final Uml2XsdPlugin plugin, final File file) { try { final OutputStream outstream = new BufferedOutputStream(new FileOutputStream(file)); try { writeSchema(elements, model, plugin, outstream); } finally { closeQuiet(out... | Uml2XsdWriter { public static final void writeSchema(final List<PsmDocument<Type>> elements, final ModelIndex model, final Uml2XsdPlugin plugin, final File file) { try { final OutputStream outstream = new BufferedOutputStream(new FileOutputStream(file)); try { writeSchema(elements, model, plugin, outstream); } finally ... | Uml2XsdWriter { public static final void writeSchema(final List<PsmDocument<Type>> elements, final ModelIndex model, final Uml2XsdPlugin plugin, final File file) { try { final OutputStream outstream = new BufferedOutputStream(new FileOutputStream(file)); try { writeSchema(elements, model, plugin, outstream); } finally ... | Uml2XsdWriter { public static final void writeSchema(final List<PsmDocument<Type>> elements, final ModelIndex model, final Uml2XsdPlugin plugin, final File file) { try { final OutputStream outstream = new BufferedOutputStream(new FileOutputStream(file)); try { writeSchema(elements, model, plugin, outstream); } finally ... | Uml2XsdWriter { public static final void writeSchema(final List<PsmDocument<Type>> elements, final ModelIndex model, final Uml2XsdPlugin plugin, final File file) { try { final OutputStream outstream = new BufferedOutputStream(new FileOutputStream(file)); try { writeSchema(elements, model, plugin, outstream); } finally ... |
@Test public void testDeclarePrefixMappings() throws Exception { final Map<String, String> prefixMappings = pluginForMongo.declarePrefixMappings(); Assert.assertTrue(prefixMappings.containsKey("sli")); } | @Override public Map<String, String> declarePrefixMappings() { final Map<String, String> pms = new HashMap<String, String>(); pms.put("sli", SliMongoConstants.NAMESPACE_SLI); return Collections.unmodifiableMap(pms); } | PluginForMongo implements Uml2XsdPlugin { @Override public Map<String, String> declarePrefixMappings() { final Map<String, String> pms = new HashMap<String, String>(); pms.put("sli", SliMongoConstants.NAMESPACE_SLI); return Collections.unmodifiableMap(pms); } } | PluginForMongo implements Uml2XsdPlugin { @Override public Map<String, String> declarePrefixMappings() { final Map<String, String> pms = new HashMap<String, String>(); pms.put("sli", SliMongoConstants.NAMESPACE_SLI); return Collections.unmodifiableMap(pms); } } | PluginForMongo implements Uml2XsdPlugin { @Override public Map<String, String> declarePrefixMappings() { final Map<String, String> pms = new HashMap<String, String>(); pms.put("sli", SliMongoConstants.NAMESPACE_SLI); return Collections.unmodifiableMap(pms); } static final boolean isUnbounded(final Occurs occurs); @Ove... | PluginForMongo implements Uml2XsdPlugin { @Override public Map<String, String> declarePrefixMappings() { final Map<String, String> pms = new HashMap<String, String>(); pms.put("sli", SliMongoConstants.NAMESPACE_SLI); return Collections.unmodifiableMap(pms); } static final boolean isUnbounded(final Occurs occurs); @Ove... |
@Test public void testGetElementType() throws Exception { final QName qName = pluginForMongo.getElementType("test", false); Assert.assertEquals("test", qName.getLocalPart()); } | @Override public QName getElementType(final String name, final boolean isAssociation) { return getTypeName(name); } | PluginForMongo implements Uml2XsdPlugin { @Override public QName getElementType(final String name, final boolean isAssociation) { return getTypeName(name); } } | PluginForMongo implements Uml2XsdPlugin { @Override public QName getElementType(final String name, final boolean isAssociation) { return getTypeName(name); } } | PluginForMongo implements Uml2XsdPlugin { @Override public QName getElementType(final String name, final boolean isAssociation) { return getTypeName(name); } static final boolean isUnbounded(final Occurs occurs); @Override Map<String, String> declarePrefixMappings(); @Override QName getElementName(final String name, f... | PluginForMongo implements Uml2XsdPlugin { @Override public QName getElementType(final String name, final boolean isAssociation) { return getTypeName(name); } static final boolean isUnbounded(final Occurs occurs); @Override Map<String, String> declarePrefixMappings(); @Override QName getElementName(final String name, f... |
@Test public void testGetGraphAssociationEndName() throws Exception { final PsmDocument<Type> doc = new PsmDocument<Type>(Mockito.mock(Type.class), new PsmResource("testResource"), new PsmCollection("testCollection")); Assert.assertEquals("testResource", pluginForMongo.getGraphAssociationEndName(doc).getLocalPart()); } | @Override public QName getGraphAssociationEndName(final PsmDocument<Type> classType) { return new QName(classType.getGraphAssociationEndName().getName()); } | PluginForMongo implements Uml2XsdPlugin { @Override public QName getGraphAssociationEndName(final PsmDocument<Type> classType) { return new QName(classType.getGraphAssociationEndName().getName()); } } | PluginForMongo implements Uml2XsdPlugin { @Override public QName getGraphAssociationEndName(final PsmDocument<Type> classType) { return new QName(classType.getGraphAssociationEndName().getName()); } } | PluginForMongo implements Uml2XsdPlugin { @Override public QName getGraphAssociationEndName(final PsmDocument<Type> classType) { return new QName(classType.getGraphAssociationEndName().getName()); } static final boolean isUnbounded(final Occurs occurs); @Override Map<String, String> declarePrefixMappings(); @Override ... | PluginForMongo implements Uml2XsdPlugin { @Override public QName getGraphAssociationEndName(final PsmDocument<Type> classType) { return new QName(classType.getGraphAssociationEndName().getName()); } static final boolean isUnbounded(final Occurs occurs); @Override Map<String, String> declarePrefixMappings(); @Override ... |
@Test public void testGetElementName() throws Exception { final PsmDocument<Type> doc = new PsmDocument<Type>(Mockito.mock(Type.class), new PsmResource("testResource"), new PsmCollection("testCollection")); Assert.assertEquals("testCollection", pluginForMongo.getElementName(doc).getLocalPart()); } | @Override public QName getElementName(final String name, final boolean isReference) { return new QName(Uml2XsdTools.camelCase(name)); } | PluginForMongo implements Uml2XsdPlugin { @Override public QName getElementName(final String name, final boolean isReference) { return new QName(Uml2XsdTools.camelCase(name)); } } | PluginForMongo implements Uml2XsdPlugin { @Override public QName getElementName(final String name, final boolean isReference) { return new QName(Uml2XsdTools.camelCase(name)); } } | PluginForMongo implements Uml2XsdPlugin { @Override public QName getElementName(final String name, final boolean isReference) { return new QName(Uml2XsdTools.camelCase(name)); } static final boolean isUnbounded(final Occurs occurs); @Override Map<String, String> declarePrefixMappings(); @Override QName getElementName(... | PluginForMongo implements Uml2XsdPlugin { @Override public QName getElementName(final String name, final boolean isReference) { return new QName(Uml2XsdTools.camelCase(name)); } static final boolean isUnbounded(final Occurs occurs); @Override Map<String, String> declarePrefixMappings(); @Override QName getElementName(... |
@Test public void testGetTargetNamespace() throws Exception { Assert.assertEquals(pluginForMongo.getTargetNamespace(), SliMongoConstants.NAMESPACE_SLI); } | @Override public String getTargetNamespace() { return SliMongoConstants.NAMESPACE_SLI; } | PluginForMongo implements Uml2XsdPlugin { @Override public String getTargetNamespace() { return SliMongoConstants.NAMESPACE_SLI; } } | PluginForMongo implements Uml2XsdPlugin { @Override public String getTargetNamespace() { return SliMongoConstants.NAMESPACE_SLI; } } | PluginForMongo implements Uml2XsdPlugin { @Override public String getTargetNamespace() { return SliMongoConstants.NAMESPACE_SLI; } static final boolean isUnbounded(final Occurs occurs); @Override Map<String, String> declarePrefixMappings(); @Override QName getElementName(final String name, final boolean isReference); ... | PluginForMongo implements Uml2XsdPlugin { @Override public String getTargetNamespace() { return SliMongoConstants.NAMESPACE_SLI; } static final boolean isUnbounded(final Occurs occurs); @Override Map<String, String> declarePrefixMappings(); @Override QName getElementName(final String name, final boolean isReference); ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.