コード例 #1
0
 public void HostSpecificationBadPort()
 {
     var h = new HostSpecification("x")
     {
         Port = -3,
     };
 }
コード例 #2
0
 public void HostSpecificationBadPort2()
 {
     var h = new HostSpecification("x")
     {
         Port = 0xfffff,
     };
 }
コード例 #3
0
 public void HostSpecificationBadAcceptName2()
 {
     var h = new HostSpecification("x")
     {
         AcceptName = null,
     };
 }
コード例 #4
0
 public void HostSpecificationBadAcceptName()
 {
     var h = new HostSpecification("x")
     {
         AcceptName = "=fred",
     };
 }
コード例 #5
0
        public void HostSpecificationElaborate()
        {
            const string HostName   = "1::2";
            const int    Port       = 921;
            const string AcceptName = "blimey.farfle.net";
            const string Lu1        = "FRED";
            const string Lu2        = "BOB";

            var h = new HostSpecification()
            {
                HostName  = HostName,
                Port      = Port,
                TlsTunnel = true,
                ValidateHostCertificate = false,
                LogicalUnits            = new[] { Lu1, Lu2 },
                AcceptName = AcceptName,
            };

            Assert.AreEqual(
                "L:Y:" + Lu1 + "," + Lu2 + "@[" + HostName + "]:" + Port + "=" + AcceptName,
                h.ToString());
        }
コード例 #6
0
 public void HostSpecificationEmptyHostName()
 {
     var h = new HostSpecification(" ");
 }
コード例 #7
0
 public void HostSpecificationBadHostName()
 {
     var h = new HostSpecification("x=");
 }
コード例 #8
0
        public void HostSpecificationTrivial()
        {
            var h = new HostSpecification("x");

            Assert.AreEqual("x", h.ToString());
        }
コード例 #9
0
        public void HostSpecificationBadLuName2()
        {
            var h = new HostSpecification("x");

            h.AddLogicalUnitName(null);
        }