Exemple #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void stringWithMaximumLengthShouldBeAllowed()
        internal virtual void StringWithMaximumLengthShouldBeAllowed()
        {
            string   longestString = RandomStringUtils.randomAscii(IndexWriter.MAX_TERM_LENGTH);
            Document document      = documentRepresentingProperties(( long )123, longestString);

            assertEquals(longestString, document.getField(string.key(0)).stringValue());
        }
Exemple #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldBuildDocumentRepresentingNumberProperty()
        internal virtual void ShouldBuildDocumentRepresentingNumberProperty()
        {
            // given
            Document document = documentRepresentingProperties(( long )123, 12);

            // then
            assertEquals("123", document.get(NODE_ID_KEY));
            assertEquals(12.0, document.getField(Number.key(0)).numericValue().doubleValue(), 0.001);
        }