Package com.alibaba.druid.support.http.stat

Examples of com.alibaba.druid.support.http.stat.WebAppStat.computeUserAgent()


    }
   
    public void test_windows7_firefox() throws Exception {
        WebAppStat stat = new WebAppStat("");
       
        stat.computeUserAgent("Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0");
        Assert.assertEquals(0, stat.getBrowserIECount());
        Assert.assertEquals(0, stat.getBrowserChromeCount());
        Assert.assertEquals(1, stat.getBrowserFirefoxCount());
        Assert.assertEquals(0, stat.getBrowserIE10Count());
        Assert.assertEquals(0, stat.getBrowserIE5Count());
View Full Code Here


    }
   
    public void test_windows98_1() throws Exception {
        WebAppStat stat = new WebAppStat("");

        stat.computeUserAgent("Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; AT&T CSM6.0; FunWebProducts)");
        Assert.assertEquals(1, stat.getBrowserIECount());
        Assert.assertEquals(0, stat.getBrowserChromeCount());
        Assert.assertEquals(0, stat.getBrowserFirefoxCount());
        Assert.assertEquals(0, stat.getBrowserIE10Count());
        Assert.assertEquals(0, stat.getBrowserIE5Count());
View Full Code Here

    }
   
    public void test_windowsXP() throws Exception {
        WebAppStat stat = new WebAppStat("");
       
        stat.computeUserAgent("Mozilla/4.0 (compatible; MSIE 6.0; Windows XP)");
        Assert.assertEquals(1, stat.getBrowserIECount());
        Assert.assertEquals(0, stat.getBrowserChromeCount());
        Assert.assertEquals(0, stat.getBrowserFirefoxCount());
        Assert.assertEquals(0, stat.getBrowserIE10Count());
        Assert.assertEquals(0, stat.getBrowserIE5Count());
View Full Code Here

    }
   
    public void test_windowsXP_1() throws Exception {
        WebAppStat stat = new WebAppStat("");
       
        stat.computeUserAgent("Mozilla/4.0 (compatible; MSIE 6.1; Windows XP)");
        Assert.assertEquals(1, stat.getBrowserIECount());
        Assert.assertEquals(0, stat.getBrowserChromeCount());
        Assert.assertEquals(0, stat.getBrowserFirefoxCount());
        Assert.assertEquals(0, stat.getBrowserIE10Count());
        Assert.assertEquals(0, stat.getBrowserIE5Count());
View Full Code Here

    }
   
    public void test_windowsXP_IE6() throws Exception {
        WebAppStat stat = new WebAppStat("");
       
        stat.computeUserAgent("User-Agent: Mozilla/5.0 (compatible; MSIE 6.0;Windows XP)");
        Assert.assertEquals(1, stat.getBrowserIECount());
        Assert.assertEquals(0, stat.getBrowserChromeCount());
        Assert.assertEquals(0, stat.getBrowserFirefoxCount());
        Assert.assertEquals(0, stat.getBrowserIE10Count());
        Assert.assertEquals(0, stat.getBrowserIE5Count());
View Full Code Here

        stat.computeUserAgent("Mozilla/3.0 (compatible)");
        stat.computeUserAgent("amaya/9.52 libwww/5.4.0");
        stat.computeUserAgent("amaya/9.51 libwww/5.4.0");
        stat.computeUserAgent("amaya/9.1 libwww/5.4.0");
        stat.computeUserAgent("amaya/6.2 libwww/5.3.1");
        stat.computeUserAgent("AmigaVoyager/3.4.4 (MorphOS/PPC native)");
        stat.computeUserAgent("xChaos_Arachne/5.1.89;GPL,386+");

        Assert.assertEquals(0, stat.getBrowserIECount());
        Assert.assertEquals(0, stat.getBrowserChromeCount());
        Assert.assertEquals(0, stat.getBrowserFirefoxCount());
View Full Code Here

        stat.computeUserAgent("amaya/9.52 libwww/5.4.0");
        stat.computeUserAgent("amaya/9.51 libwww/5.4.0");
        stat.computeUserAgent("amaya/9.1 libwww/5.4.0");
        stat.computeUserAgent("amaya/6.2 libwww/5.3.1");
        stat.computeUserAgent("AmigaVoyager/3.4.4 (MorphOS/PPC native)");
        stat.computeUserAgent("xChaos_Arachne/5.1.89;GPL,386+");

        Assert.assertEquals(0, stat.getBrowserIECount());
        Assert.assertEquals(0, stat.getBrowserChromeCount());
        Assert.assertEquals(0, stat.getBrowserFirefoxCount());
        Assert.assertEquals(0, stat.getBrowserIE10Count());
View Full Code Here

        Assert.assertEquals(0, stat.getOSOpenBSDCount());
    }

    public void test_1() throws Exception {
        WebAppStat stat = new WebAppStat("");
        stat.computeUserAgent("Ubuntu APT-HTTP/1.3 (0.7.23.1ubuntu2)");
        Assert.assertEquals(0, stat.getBrowserIECount());
        Assert.assertEquals(0, stat.getBrowserChromeCount());
        Assert.assertEquals(0, stat.getBrowserFirefoxCount());
        Assert.assertEquals(0, stat.getBrowserIE10Count());
        Assert.assertEquals(0, stat.getBrowserIE6Count());
View Full Code Here

        Assert.assertEquals(0, stat.getOSOpenBSDCount());
    }

    public void test_2() throws Exception {
        WebAppStat stat = new WebAppStat("");
        stat.computeUserAgent("Ubuntu APT-HTTP/1.3");
        Assert.assertEquals(0, stat.getBrowserIECount());
        Assert.assertEquals(0, stat.getBrowserChromeCount());
        Assert.assertEquals(0, stat.getBrowserFirefoxCount());
        Assert.assertEquals(0, stat.getBrowserIE10Count());
        Assert.assertEquals(0, stat.getBrowserIE6Count());
View Full Code Here

        Assert.assertEquals(0, stat.getOSOpenBSDCount());
    }

    public void test_3() throws Exception {
        WebAppStat stat = new WebAppStat("");
        stat.computeUserAgent("Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/523.15 (KHTML, like Gecko, Safari/419.3) Arora/0.3 (Change: 287 c9dfb30)");
        Assert.assertEquals(0, stat.getBrowserIECount());
        Assert.assertEquals(0, stat.getBrowserChromeCount());
        Assert.assertEquals(0, stat.getBrowserFirefoxCount());
        Assert.assertEquals(0, stat.getBrowserIE10Count());
        Assert.assertEquals(0, stat.getBrowserIE6Count());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.