コード例 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldAppendToListWithDroppedNull()
        internal virtual void ShouldAppendToListWithDroppedNull()
        {
            // Given
            ListValue inner = list(longValue(5L), longValue(6L), longValue(7L), longValue(8L), NO_VALUE, longValue(9L), longValue(10L), longValue(11L));

            // When
            ListValue appended = inner.DropNoValues().append(longValue(12L), longValue(13L), longValue(14L));

            // Then
            ListValue expected = list(longValue(5L), longValue(6L), longValue(7L), longValue(8L), longValue(9L), longValue(10L), longValue(11L), longValue(12L), longValue(13L), longValue(14L));

            AssertListValuesEquals(appended, expected);
        }
コード例 #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldFilterList()
        internal virtual void ShouldFilterList()
        {
            // Given
            ListValue inner = list(NO_VALUE, longValue(6L), NO_VALUE, longValue(8L), longValue(9L), longValue(11L), NO_VALUE);

            // When
            ListValue filter = inner.DropNoValues();

            // Then
            ListValue expected = list(longValue(6L), longValue(8L), longValue(9L), longValue(11L));

            assertEquals(filter, expected);
            assertEquals(filter.GetHashCode(), expected.GetHashCode());
            assertArrayEquals(filter.AsArray(), expected.AsArray());
        }