//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldReadAndWriteConsistentValues() public virtual void ShouldReadAndWriteConsistentValues() { Value[] values = new Value[] { DateTimeValue.datetime(9999, 100, ZoneId.of("+18:00")), DateTimeValue.datetime(10000, 100, ZoneId.of("-18:00")), DateTimeValue.datetime(10000, 100, ZoneOffset.of("-17:59:59")), DateTimeValue.datetime(10000, 100, ZoneId.of("UTC")), DateTimeValue.datetime(10000, 100, ZoneId.of("+01:00")), DateTimeValue.datetime(10000, 100, ZoneId.of("Europe/Stockholm")), DateTimeValue.datetime(10000, 100, ZoneId.of("+03:00")), DateTimeValue.datetime(10000, 101, ZoneId.of("-18:00")) }; ZonedDateTimeLayout layout = new ZonedDateTimeLayout(); PageCursor cursor = new StubPageCursor(0, 8 * 1024); ZonedDateTimeIndexKey writeKey = layout.NewKey(); ZonedDateTimeIndexKey readKey = layout.NewKey(); // Write all foreach (Value value in values) { value.WriteTo(writeKey); layout.WriteKey(cursor, writeKey); } // Read all cursor.Offset = 0; foreach (Value value in values) { layout.ReadKey(cursor, readKey, ZonedDateTimeIndexKey.Size); assertEquals(value, readKey.AsValue()); } }
public override bool AcceptsValue(Value value) { return(Values.isTextValue(value) && (( TextValue )value).startsWith(PrefixConflict)); }
public override bool AcceptsValue(Value value) { return(ExactValue.Equals(value)); }
internal ExactPredicate(int propertyKeyId, object value) : base(propertyKeyId) { this.ExactValue = value is Value ? ( Value )value : Values.of(value); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: abstract void setProperty(org.neo4j.internal.kernel.api.Write writeOps, long entityId, int propertyKeyId, org.neo4j.values.storable.Value value) throws Exception; internal abstract void SetProperty(Write writeOps, long entityId, int propertyKeyId, Value value);
public static IndexQuery Exact(int propertyKeyId, Value value) { return(IndexQuery.exact(propertyKeyId, value)); }
internal override void WriteValue(int stateSlot, Value value, Inclusion inclusion) { value.WriteTo(this); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldSetAndReadLargeByteArrayPropertyToNode() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldSetAndReadLargeByteArrayPropertyToNode() { // Given int prop; long node = CreateNode(); Value largeByteArray = Values.of(new sbyte[100_000]);
internal abstract org.apache.lucene.search.Query encodeQuery(Org.Neo4j.Values.Storable.Value value, int propertyNumber);
internal override void AssertValidValue(int stateSlot, Value value) { //noinspection ResultOfMethodCallIgnored Preconditions.requireExactlyZero(stateSlot); AssertCorrectType(value); }
internal abstract void setFieldValue(Org.Neo4j.Values.Storable.Value value, org.apache.lucene.document.Field field);
internal abstract org.apache.lucene.document.Field encodeField(string name, Org.Neo4j.Values.Storable.Value value);
abstract bool canEncode(Org.Neo4j.Values.Storable.Value value);
public override bool AcceptsValue(Value value) { return(Values.isTextValue(value) && (( TextValue )value).contains(ContainsConflict)); }
internal abstract Value AssertCorrectType(Value value);
public override bool AcceptsValue(Value value) { return(Values.isTextValue(value) && (( TextValue )value).endsWith(SuffixConflict)); }
internal virtual void From(Value value) { AssertCorrectType(value); value.WriteTo(this); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: void setProperty(org.neo4j.internal.kernel.api.Write writeOps, long entityId, int propertyKeyId, org.neo4j.values.storable.Value value) throws Exception internal override void SetProperty(Write writeOps, long entityId, int propertyKeyId, Value value) { writeOps.RelationshipSetProperty(entityId, propertyKeyId, value); }
public abstract bool AcceptsValue(Value value);
protected internal override int IndexKeyLength(Value value) { return((( TextValue )value).stringValue().GetBytes().length); }
public override bool AcceptsValue(Value value) { return(value != null && value != NO_VALUE); }
private static bool IsNumberGeometryOrArray(Value value) { return(Values.isNumberValue(value) || Values.isGeometryValue(value) || Values.isArrayValue(value)); }
internal ExpectedProperty(int key, object value, bool?assertHasDynamicRecords) { this.Key = key; this.Value = Values.of(value); this.AssertHasDynamicRecords = assertHasDynamicRecords; }