예제 #1
0
        public void IPAddressGeneratorTest()
        {
            IGenerator <string> ipaddress = new IPAddressGenerator();
            var ipaddy = (string)ipaddress.Generate();

            Assert.IsNotNull(ipaddy);
            Assert.IsTrue(IsValidIPAddress(ipaddy));
        }
예제 #2
0
        public void IPAddressGenerator()
        {
            IIPAddressGenerator ipaddressgenerator = new IPAddressGenerator();
            string ipaddy = ipaddressgenerator.Generate(random, string.Empty, string.Empty, string.Empty, string.Empty);

            Assert.IsNotNull(ipaddy);
            Regex testpattern = new Regex("^(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])$");

            Assert.IsTrue(testpattern.IsMatch(ipaddy));
        }
예제 #3
0
 public void IPAddressGenerator()
 {
     IIPAddressGenerator ipaddressgenerator = new IPAddressGenerator();
     string ipaddy = ipaddressgenerator.Generate(random, string.Empty, string.Empty, string.Empty, string.Empty);
     Assert.IsNotNull(ipaddy);
     Regex testpattern=new Regex("^(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])$");
     Assert.IsTrue(testpattern.IsMatch(ipaddy));
 }
예제 #4
0
 public void IPAddressGeneratorTest()
 {
     IGenerator<string> ipaddress = new IPAddressGenerator();
     var ipaddy = (string) ipaddress.Generate();
     Assert.IsNotNull(ipaddy);
     Assert.IsTrue(IsValidIPAddress(ipaddy));
 }