-
Notifications
You must be signed in to change notification settings - Fork 625
Drop FieldValue from tests #1216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop FieldValue from tests #1216
Conversation
Codecov Report
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -31,9 +31,9 @@ | |||
@Config(manifest = Config.NONE) | |||
public class ObjectValueBuilderTest { | |||
private String fooString = "foo"; | |||
private Value fooValue = valueOf(fooString); | |||
private Value fooValue = TestUtil.wrap(fooString); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Static import TestUtil.wrap
(to match other usages above).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
} | ||
|
||
@Test | ||
public void testEncodesNull() { | ||
FieldValue value = wrap(null); | ||
Value value = wrap(null); | ||
com.google.firestore.v1.Value proto = valueBuilder().setNullValueValue(0).build(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace fully qualified com.google.firestore.v1.Value
declarations in here with just Value
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
wrap()
returnsValue
and replacesvalueOf()
test helperFieldValueTest.testValueEquality()
,FieldValueTest.testValueOrdering()
andFieldValueTest.testCanonicalIds()
to a new ProtoValuesTest files that test the ProtoValues functionality directly (via a small FieldValue-alike helper)This is the last cleanup PR before I want to merge to master. We can discuss if we should proceed with the suggested renames as well.