Skip to content

Commit

Permalink
improve test var names
Browse files Browse the repository at this point in the history
Change-Id: I90e78b63b7eab76266ee8f10dca36e82787f4519
  • Loading branch information
javeme committed Jun 9, 2020
1 parent a1e0b27 commit b4c767b
Showing 1 changed file with 25 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void testCopySchemaWithMultiGraphs() {
schema.propertyKey("time").asDate().ifNotExist().create();

schema.vertexLabel("person")
.properties("id", "name", "age", "city","weight", "born")
.properties("id", "name", "age", "city", "weight", "born")
.primaryKeys("id").create();
schema.vertexLabel("person2")
.properties("id", "name", "age", "city")
Expand Down Expand Up @@ -135,43 +135,43 @@ public void testCopySchemaWithMultiGraphs() {
Assert.assertTrue(g2.existsIndexLabel("personByAge"));
Assert.assertTrue(g2.existsIndexLabel("friendByTime"));

for (PropertyKey pk : g2.schema().getPropertyKeys()) {
PropertyKey expected = g1.schema().getPropertyKey(pk.name());
Assert.assertTrue(expected.hasSameContent(pk));
for (PropertyKey copied : g2.schema().getPropertyKeys()) {
PropertyKey origin = g1.schema().getPropertyKey(copied.name());
Assert.assertTrue(origin.hasSameContent(copied));
}
for (VertexLabel vl : schema.getVertexLabels()) {
VertexLabel expected = g1.schema().getVertexLabel(vl.name());
Assert.assertTrue(expected.hasSameContent(vl));
for (VertexLabel copied : schema.getVertexLabels()) {
VertexLabel origin = g1.schema().getVertexLabel(copied.name());
Assert.assertTrue(origin.hasSameContent(copied));
}
for (EdgeLabel el : schema.getEdgeLabels()) {
EdgeLabel expected = g1.schema().getEdgeLabel(el.name());
Assert.assertTrue(expected.hasSameContent(el));
for (EdgeLabel copied : schema.getEdgeLabels()) {
EdgeLabel origin = g1.schema().getEdgeLabel(copied.name());
Assert.assertTrue(origin.hasSameContent(copied));

}
for (IndexLabel il : schema.getIndexLabels()) {
IndexLabel expected = g1.schema().getIndexLabel(il.name());
Assert.assertTrue(expected.hasSameContent(il));
for (IndexLabel copied : schema.getIndexLabels()) {
IndexLabel origin = g1.schema().getIndexLabel(copied.name());
Assert.assertTrue(origin.hasSameContent(copied));
}

// Copy schema again from g1 to g2 (ignore identical content)
g2.schema().copyFrom(g1.schema());

for (PropertyKey pk : g2.schema().getPropertyKeys()) {
PropertyKey expected = g1.schema().getPropertyKey(pk.name());
Assert.assertTrue(expected.hasSameContent(pk));
for (PropertyKey copied : g2.schema().getPropertyKeys()) {
PropertyKey origin = g1.schema().getPropertyKey(copied.name());
Assert.assertTrue(origin.hasSameContent(copied));
}
for (VertexLabel vl : schema.getVertexLabels()) {
VertexLabel expected = g1.schema().getVertexLabel(vl.name());
Assert.assertTrue(expected.hasSameContent(vl));
for (VertexLabel copied : schema.getVertexLabels()) {
VertexLabel origin = g1.schema().getVertexLabel(copied.name());
Assert.assertTrue(origin.hasSameContent(copied));
}
for (EdgeLabel el : schema.getEdgeLabels()) {
EdgeLabel expected = g1.schema().getEdgeLabel(el.name());
Assert.assertTrue(expected.hasSameContent(el));
for (EdgeLabel copied : schema.getEdgeLabels()) {
EdgeLabel origin = g1.schema().getEdgeLabel(copied.name());
Assert.assertTrue(origin.hasSameContent(copied));

}
for (IndexLabel il : schema.getIndexLabels()) {
IndexLabel expected = g1.schema().getIndexLabel(il.name());
Assert.assertTrue(expected.hasSameContent(il));
for (IndexLabel copied : schema.getIndexLabels()) {
IndexLabel origin = g1.schema().getIndexLabel(copied.name());
Assert.assertTrue(origin.hasSameContent(copied));
}

for (HugeGraph graph : graphs) {
Expand Down

0 comments on commit b4c767b

Please sign in to comment.