예제 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldSendApplicationProtocolRequestOnInitiation()
        public virtual void ShouldSendApplicationProtocolRequestOnInitiation()
        {
            _client.initiate(_channel, _applicationProtocolRepository, _modifierProtocolRepository);

            ApplicationProtocolRequest expectedMessage = new ApplicationProtocolRequest(_applicationProtocolIdentifier.canonicalName(), _applicationProtocolRepository.getAll(_applicationProtocolIdentifier, emptyList()).versions());

            verify(_channel).writeAndFlush(expectedMessage);
        }
예제 #2
0
        private void SendProtocolRequests(Channel channel, ApplicationSupportedProtocols applicationProtocols, ICollection <ModifierSupportedProtocols> supportedModifierProtocols)
        {
            supportedModifierProtocols.forEach(modifierProtocol =>
            {
                ProtocolSelection <string, ModifierProtocol> protocolSelection = _modifierProtocolRepository.getAll(modifierProtocol.identifier(), modifierProtocol.versions());
                channel.Write(new ModifierProtocolRequest(protocolSelection.Identifier(), protocolSelection.Versions()));
            });

            ProtocolSelection <int, Protocol_ApplicationProtocol> applicationProtocolSelection = _applicationProtocolRepository.getAll(applicationProtocols.Identifier(), applicationProtocols.Versions());

            channel.WriteAndFlush(new ApplicationProtocolRequest(applicationProtocolSelection.Identifier(), applicationProtocolSelection.Versions()));
        }