コード例 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldMutuallySupportParameterIfEmptyVersions()
        public virtual void ShouldMutuallySupportParameterIfEmptyVersions()
        {
            // given
            ApplicationSupportedProtocols supportedProtocols = new ApplicationSupportedProtocols(RAFT, emptyList());

            // when
            ISet <int> mutuallySupported = supportedProtocols.MutuallySupportedVersionsFor(Iterators.asSet(7, 8));

            // then
            assertThat(mutuallySupported, containsInAnyOrder(7, 8));
        }
コード例 #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldMutuallySupportNothingIfParametersEmpty()
        public virtual void ShouldMutuallySupportNothingIfParametersEmpty()
        {
            // given
            ApplicationSupportedProtocols supportedProtocols = new ApplicationSupportedProtocols(RAFT, Arrays.asList(1, 2));

            // when
            ISet <int> mutuallySupported = supportedProtocols.MutuallySupportedVersionsFor(emptySet());

            // then
            assertThat(mutuallySupported, empty());
        }
コード例 #3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldMutuallySupportIntersectionOfParameterVersionsSubset()
        public virtual void ShouldMutuallySupportIntersectionOfParameterVersionsSubset()
        {
            // given
            ApplicationSupportedProtocols supportedProtocols = new ApplicationSupportedProtocols(RAFT, Arrays.asList(4, 5, 6));

            // when
            ISet <int> mutuallySupported = supportedProtocols.MutuallySupportedVersionsFor(Iterators.asSet(4, 5));

            // then
            assertThat(mutuallySupported, containsInAnyOrder(4, 5));
        }