Ejemplo n.º 1
0
        public void No_Port_Name_Throws_PortNameException()
        {
            var expectedMessage = new PortNameException(string.Empty).Message;

            Check.ThatCode(() => Program.Main(new string[0]))
            .Throws <PortNameException>()
            .WithMessage(expectedMessage);
        }
Ejemplo n.º 2
0
        public void Invalid_Port_Name_Throws_PortNameException()
        {
            const string portName        = "badPort";
            var          expectedMessage = new PortNameException(portName).Message;

            Check.ThatCode(() => Program.Main(new [] { portName, ValidListenerUri }))
            .Throws <PortNameException>()
            .WithMessage(expectedMessage);
        }