Exemplo n.º 1
0
        public void IPAddressGeneratorTest()
        {
            IGenerator <string> ipaddress = new IPAddressGenerator();
            var ipaddy = (string)ipaddress.Generate();

            Assert.IsNotNull(ipaddy);
            Assert.IsTrue(IsValidIPAddress(ipaddy));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
 }
Exemplo n.º 4
0
 public void IPAddressGeneratorTest()
 {
     IGenerator<string> ipaddress = new IPAddressGenerator();
     var ipaddy = (string) ipaddress.Generate();
     Assert.IsNotNull(ipaddy);
     Assert.IsTrue(IsValidIPAddress(ipaddy));
 }