Esempio n. 1
0
        public void DefaultSecureWebSocketPortUnitTest()
        {
            logger.LogDebug("--> " + System.Reflection.MethodBase.GetCurrentMethod().Name);
            logger.BeginScope(System.Reflection.MethodBase.GetCurrentMethod().Name);

            SIPURI uri = SIPURI.ParseSIPURI("sip:user@[2001:730:3ec2::10]:443;transport=wss?Replaces=xyz");

            Assert.Equal(SIPProtocolsEnum.wss, uri.Protocol);
            Assert.True(uri.IsDefaultPort());

            logger.LogDebug("-----------------------------------------");
        }
Esempio n. 2
0
        public void NonDefaultUdpPortUnitTest()
        {
            logger.LogDebug("--> " + System.Reflection.MethodBase.GetCurrentMethod().Name);
            logger.BeginScope(System.Reflection.MethodBase.GetCurrentMethod().Name);

            SIPURI uri = SIPURI.ParseSIPURI("sip:user@[2001:730:3ec2::10]:5080?Replaces=xyz");

            Assert.Equal(SIPProtocolsEnum.udp, uri.Protocol);
            Assert.False(uri.IsDefaultPort());

            logger.LogDebug("-----------------------------------------");
        }