Exemple #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldBuildDocumentRepresentingStringProperty()
        internal virtual void ShouldBuildDocumentRepresentingStringProperty()
        {
            // given
            Document document = documentRepresentingProperties(( long )123, "hello");

            // then
            assertEquals("123", document.get(NODE_ID_KEY));
            assertEquals("hello", document.get(string.key(0)));
        }
Exemple #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldBuildDocumentRepresentingBoolProperty()
        internal virtual void ShouldBuildDocumentRepresentingBoolProperty()
        {
            // given
            Document document = documentRepresentingProperties(( long )123, true);

            // then
            assertEquals("123", document.get(NODE_ID_KEY));
            assertEquals("true", document.get(Bool.key(0)));
        }
Exemple #3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldBuildDocumentRepresentingMultipleStringProperties()
        internal virtual void ShouldBuildDocumentRepresentingMultipleStringProperties()
        {
            // given
            string[] values   = new string[] { "hello", "world" };
            Document document = documentRepresentingProperties(123, values);

            // then
            assertEquals("123", document.get(NODE_ID_KEY));
            assertThat(document.get(string.key(0)), equalTo(values[0]));
            assertThat(document.get(string.key(1)), equalTo(values[1]));
        }
Exemple #4
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldBuildDocumentRepresentingMultiplePropertiesOfDifferentTypes()
        internal virtual void ShouldBuildDocumentRepresentingMultiplePropertiesOfDifferentTypes()
        {
            // given
            object[] values   = new object[] { "hello", 789 };
            Document document = documentRepresentingProperties(123, values);

            // then
            assertEquals("123", document.get(NODE_ID_KEY));
            assertThat(document.get(string.key(0)), equalTo("hello"));
            assertThat(document.get(Number.key(1)), equalTo("789.0"));
        }
Exemple #5
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldBuildDocumentRepresentingArrayProperty()
        internal virtual void ShouldBuildDocumentRepresentingArrayProperty()
        {
            // given
            Document document = documentRepresentingProperties((long)123, new object[]
            {
                new int?[] { 1, 2, 3 }
            });

            // then
            assertEquals("123", document.get(NODE_ID_KEY));
            assertEquals("D1.0|2.0|3.0|", document.get(Array.key(0)));
        }
Exemple #6
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);
        }