Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ddf-rpc-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -202,17 +202,17 @@
<limit implementation="org.codice.jacoco.LenientLimit">
<counter>INSTRUCTION</counter>
<value>COVEREDRATIO</value>
<minimum>0.12</minimum>
<minimum>0.20</minimum>
</limit>
<limit implementation="org.codice.jacoco.LenientLimit">
<counter>BRANCH</counter>
<value>COVEREDRATIO</value>
<minimum>0.08</minimum>
<minimum>0.14</minimum>
</limit>
<limit implementation="org.codice.jacoco.LenientLimit">
<counter>COMPLEXITY</counter>
<value>COVEREDRATIO</value>
<minimum>0.12</minimum>
<minimum>0.18</minimum>
</limit>
</limits>
</rule>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ public class MetacardTypeMethods implements MethodSet {

private static final String ISINJECTED_KEY = "isInjected";

private static final String INDEXED_KEY = "indexed";

private static final String STORED_KEY = "stored";

private static final String TOKENIZED_KEY = "tokenized";

private final Map<String, RpcMethod> methods;

private final RpcFactory rpc = new RpcFactoryImpl();
Expand Down Expand Up @@ -106,6 +112,9 @@ public Map<String, Object> getMetacardTypeMap(List<MetacardType> metacardTypeLis
Map<String, Object> attributeProperties = new HashMap<>();
attributeProperties.put(TYPE_KEY, descriptor.getType().getAttributeFormat().name());
attributeProperties.put(MULTIVALUED_KEY, descriptor.isMultiValued());
attributeProperties.put(INDEXED_KEY, descriptor.isIndexed());
attributeProperties.put(STORED_KEY, descriptor.isStored());
attributeProperties.put(TOKENIZED_KEY, descriptor.isTokenized());
Comment on lines +115 to +117
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to have at least a couple unit tests for this class.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generated some tests for this class.

attributeProperties.put(ID_KEY, descriptor.getName());
attributeProperties.put(ISINJECTED_KEY, false);
attributes.put(descriptor.getName(), attributeProperties);
Expand All @@ -122,6 +131,9 @@ public Map<String, Object> getMetacardTypeMap(List<MetacardType> metacardTypeLis
Map<String, Object> attributeProperties = new HashMap<>();
attributeProperties.put(TYPE_KEY, descriptor.getType().getAttributeFormat().name());
attributeProperties.put(MULTIVALUED_KEY, descriptor.isMultiValued());
attributeProperties.put(INDEXED_KEY, descriptor.isIndexed());
attributeProperties.put(STORED_KEY, descriptor.isStored());
attributeProperties.put(TOKENIZED_KEY, descriptor.isTokenized());
attributeProperties.put(ID_KEY, descriptor.getName());
attributeProperties.put(ISINJECTED_KEY, true);
Set<String> types =
Expand Down
Loading
Loading