Skip to content
Snippets Groups Projects
Commit 77480d77 authored by Zhibin Mai's avatar Zhibin Mai
Browse files

Fix unit tests

parent 7b5d4955
No related branches found
No related tags found
4 merge requests!545Draft: add env variables,!543Draft: az/sa-support-index-extended-properties,!540Draft: support index extended properties,!465Index extended properties defined in property configurations
Pipeline #178831 failed
......@@ -24,8 +24,8 @@ import lombok.ToString;
@ToString
@JsonInclude(JsonInclude.Include.NON_NULL)
public class RelatedObjectsSpec extends RelatedCondition {
private final String CHILD_TO_PARENT = "ChildToParent";
private final String PARENT_TO_CHILDREN = "ParentToChildren";
public final static String CHILD_TO_PARENT = "ChildToParent";
public final static String PARENT_TO_CHILDREN = "ParentToChildren";
private String relatedObjectID;
......
......@@ -31,6 +31,7 @@ public class RelatedObjectsSpecTest {
public void hasValidCondition_return_true() {
RelatedObjectsSpec spec = new RelatedObjectsSpec();
spec.setRelatedObjectKind("osdu:wks:master-data--GeoPoliticalEntity:1.");
spec.setRelationshipDirection(RelatedObjectsSpec.CHILD_TO_PARENT);
spec.setRelatedObjectID("data.GeoContexts[].GeoPoliticalEntityID");
spec.setRelatedConditionProperty("data.GeoContexts[].GeoTypeID");
List<String> matches = Arrays.asList("opendes:reference-data--GeoPoliticalEntityType:Country:");
......@@ -43,6 +44,7 @@ public class RelatedObjectsSpecTest {
public void hasValidCondition_return_true_with_multi_nested() {
RelatedObjectsSpec spec = new RelatedObjectsSpec();
spec.setRelatedObjectKind("osdu:wks:master-data--Organisation:1.");
spec.setRelationshipDirection(RelatedObjectsSpec.CHILD_TO_PARENT);
spec.setRelatedObjectID("data.TechnicalAssurances[].Reviewers[].OrganisationID");
spec.setRelatedConditionProperty("data.TechnicalAssurances[].Reviewers[].RoleTypeID");
List<String> matches = Arrays.asList("opendes:reference-data--ContactRoleType:AccountOwner:");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment