Exemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldHaveEmptyOutputIfNoInstalledProtocols() throws Throwable
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldHaveEmptyOutputIfNoInstalledProtocols()
        {
            // given
            InstalledProtocolsProcedure installedProtocolsProcedure = new InstalledProtocolsProcedure(Stream.empty, Stream.empty);

            // when
            RawIterator <object[], ProcedureException> result = installedProtocolsProcedure.Apply(null, null, null);

            // then
            assertFalse(result.HasNext());
        }
Exemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldListInboundProtocols() throws Throwable
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldListInboundProtocols()
        {
            // given
            InstalledProtocolsProcedure installedProtocolsProcedure = new InstalledProtocolsProcedure(Stream.empty, () => Stream.of(_inbound1, _inbound2));

            // when
            RawIterator <object[], ProcedureException> result = installedProtocolsProcedure.Apply(null, null, null);

            // then
            assertThat(result.Next(), arrayContaining("inbound", "host3:3", "raft", 3L, "[TestSnappy]"));
            assertThat(result.Next(), arrayContaining("inbound", "host4:4", "raft", 4L, "[]"));
            assertFalse(result.HasNext());
        }
Exemplo n.º 3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldListOutboundProtocols() throws Throwable
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldListOutboundProtocols()
        {
            // given
            InstalledProtocolsProcedure installedProtocolsProcedure = new InstalledProtocolsProcedure(() => Stream.of(_outbound1, _outbound2), Stream.empty);

            // when
            RawIterator <object[], ProcedureException> result = installedProtocolsProcedure.Apply(null, null, null);

            // then
            assertThat(result.Next(), arrayContaining("outbound", "host1:1", "raft", 1L, "[TestSnappy]"));
            assertThat(result.Next(), arrayContaining("outbound", "host2:2", "raft", 2L, "[TestSnappy,ROT13]"));
            assertFalse(result.HasNext());
        }