Name the shared test entities for what they hold - #2485
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…at uses them Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…sts read into Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
No test sets or reads it. It only showed up in the list of properties that the Update and Replace tests drop, so those snapshots lose one entry and the bindings after it move up by one letter. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
It served a single test, which compared two of its int properties with each other. Being a vertex type nevertheless, its label was part of every query that asks for all vertices. That test now compares WorksFor.From with WorksFor.To instead, which yields the same where(lt(...)).by(...).by(...) shape, and gives the otherwise only written To property a reader. As every WorksFor the tests add has From equal to To, it still finds nothing. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The test entities' domain does not stand for anything any more. They only carry properties of particular types, so they are named for what they hold: this one a bool and two TimeSpans. Test names that mention TimeFrame stay, as the order the tests run in follows their names. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
It is the vertex with nothing but a single string property. Its label now sorts last, which moves it to the end of every list of all vertex labels and of every result grouped by label. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
It is the vertex that carries the meta-properties: an untyped one, one with a dictionary of them, and a string array to ask Properties() about. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Next to Person, it is the second vertex below the abstract Authority, which is what the tests about abstract types and interfaces query for. Its label now sorts after Person's, so the lists of labels that stand for Authority change their order. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
It is the vertex with the most properties of the most kinds, which is why most tests use it. Labels that spell it in lower case, to show that a label is matched regardless of case, now spell richvertex. Test names that mention Person stay, as the order the tests run in follows their names. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
It is the edge without properties, the third edge type that the tests about several edge labels at once need. Its label now sorts first among the edge labels. As Gremlin Server walks a vertex's edges label by label, in the order they are asked for, that moves its edges to the front of what the queries over all edge labels return there. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
It is the edge with a Property<T>, which is what the tests about edge properties read and write. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
It is the edge with several plain properties, which the tests about adding, updating and replacing edges, and about ignoring members on edges, use. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
They are the abstract base of RichVertex and SiblingVertex and the interface it implements, which the tests about abstract types, interfaces and inherited member configuration query for. Their names appear in no snapshot. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
It is the model of the meta-properties that AbstractVertex.Name and SiblingVertex.Locations carry. Its name appears in no snapshot. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
It is the tests' general purpose enum. Its values keep their numbers, and their names now say them: Male, Female and NonBinary become Zero, One and Two. The GraphSON tests that read the names, in any case, as numbers or combined, now spell the new ones. The members holding it keep their names for now. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
RichVertex.Gender, and the members of ClassWithEnumConstructor named after the enum's old name, are named for what they hold now. Enum sorts between Age and Image just as Gender did, so the order of the property steps is the same. Gremlin Server keeps a vertex's properties by name, though, so it returns them in another order for the tests that read all of them. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…types it holds Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 14.x #2485 +/- ##
=======================================
Coverage 93.70% 93.70%
=======================================
Files 279 279
Lines 7905 7905
Branches 886 886
=======================================
Hits 7407 7407
Misses 310 310
Partials 188 188 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The shared test entities in
ExRam.Gremlinq.Tests.Entitiesare now named for what they hold, not for a made-up domain. Single-purpose types live next to the one test that uses them, and types and members that no test used are gone. Only test code changes; the library does not.Changes
PersonRichVertexCompanySiblingVertexAuthority/IAuthorityAbstractVertex/IAbstractVertexCountryMetaPropertyVertexLanguageSimpleVertexTimeFrameScalarVertexTimeSpansWorksForRichEdgeLivesInPropertyEdgeProperty<T>SpeaksEmptyEdgePropertyValidityMetaModelGender { Male, Female, NonBinary }SomeEnum { Zero, One, Two }EnumEntityWithTwoIntPropertiesRichEdge.FromwithRichEdge.ToVertexWithListIdPerson.SomeObscurePropertyVertexWithStringId,EdgeWithStringIdQueryExecutionTestProjectRecord,ProjectRecordStructTests.Infrastructure/ProjectionsEverythingAllAtOnce,MetaPoco,PersonLanguageTupleTests.Infrastructure/GraphSon/Entities(the tuple is nowRichVertexSimpleVertexTuple)Every step is its own commit, with the snapshots it changes.
Notes
SideEffectTestCaseOrdererruns the tests in name order, and that order decides the ids Gremlin Server hands out. Renaming tests would renumber the integration snapshots.hasLabel(...)lists and in Groovy binding letters. Gremlin Server also returns some results in an order that depends on names:out()over all edge labels walks the labels in the order given.🤖 Generated with Claude Code