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

Examples of com.alibaba.druid.support.http.stat.WebAppStat


        Assert.assertEquals(1, stat.getBrowserIE7Count());
        Assert.assertEquals(1, stat.getOSWindowsCount());
    }

    public void test_agent_ie7_1() throws Exception {
        WebAppStat stat = new WebAppStat("");
        stat.computeUserAgent("Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.3; SE 2.X MetaSr 1.0)");
        Assert.assertEquals(1, stat.getBrowserIECount());
        Assert.assertEquals(1, stat.getBrowserIE7Count());
        Assert.assertEquals(1, stat.getOSWindowsCount());
    }
View Full Code Here


        Assert.assertEquals(1, stat.getBrowserIE7Count());
        Assert.assertEquals(1, stat.getOSWindowsCount());
    }

    public void test_agent_ie6() throws Exception {
        WebAppStat stat = new WebAppStat("");
        stat.computeUserAgent("Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 6.0; MAXTHON 2.0)");
        Assert.assertEquals(1, stat.getBrowserIECount());
        Assert.assertEquals(1, stat.getBrowserIE6Count());
        Assert.assertEquals(1, stat.getOSWindowsCount());
    }
View Full Code Here

        Assert.assertEquals(1, stat.getBrowserIE6Count());
        Assert.assertEquals(1, stat.getOSWindowsCount());
    }

    public void test_agent_ie6_1() throws Exception {
        WebAppStat stat = new WebAppStat("");
        stat.computeUserAgent("Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
        Assert.assertEquals(1, stat.getBrowserIECount());
        Assert.assertEquals(1, stat.getBrowserIE6Count());
        Assert.assertEquals(1, stat.getOSWindowsCount());
    }
View Full Code Here

        Assert.assertEquals(1, stat.getBrowserIE6Count());
        Assert.assertEquals(1, stat.getOSWindowsCount());
    }

    public void test_agent_ie6_2() 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(1, stat.getBrowserIE6Count());
        Assert.assertEquals(1, stat.getOSWindowsCount());
    }
View Full Code Here

        Assert.assertEquals(1, stat.getBrowserIE6Count());
        Assert.assertEquals(1, stat.getOSWindowsCount());
    }

    public void test_agent_ie5() throws Exception {
        WebAppStat stat = new WebAppStat("");
        stat.computeUserAgent("Mozilla/4.0 (compatible; MSIE 5.00; Windows 98)");
        Assert.assertEquals(1, stat.getBrowserIECount());
        Assert.assertEquals(1, stat.getBrowserIE5Count());
        Assert.assertEquals(1, stat.getOSWindowsCount());
    }
View Full Code Here

        Assert.assertEquals(1, stat.getBrowserIE5Count());
        Assert.assertEquals(1, stat.getOSWindowsCount());
    }

    public void test_agent_ipad() throws Exception {
        WebAppStat stat = new WebAppStat("");
        stat.computeUserAgent("Mozilla/5.0 (iPad; U; CPU OS 4_2_1 like Mac OS X; zh-cn) AppleWebKit/533.17.9 (KHTML, like Gecko) ");
        Assert.assertEquals(0, stat.getBrowserIECount());
        Assert.assertEquals(1, stat.getOSMacOSXCount());
        Assert.assertEquals(1, stat.getDeviceIpadCount());
    }
View Full Code Here

        Assert.assertEquals(1, stat.getOSMacOSXCount());
        Assert.assertEquals(1, stat.getDeviceIpadCount());
    }

    public void test_agent_firefox() throws Exception {
        WebAppStat stat = new WebAppStat("");
        stat.computeUserAgent("Mozilla/5.0 (X11; U; Linux x86_64; zh-CN; rv:1.9.2.10) Gecko/20100922 Ubuntu/10.10 (maverick) Firefox/3.6.10");
        Assert.assertEquals(0, stat.getBrowserIECount());
        Assert.assertEquals(1, stat.getBrowserFirefoxCount());
        Assert.assertEquals(1, stat.getOSLinuxCount());
    }
View Full Code Here

        Assert.assertEquals(1, stat.getBrowserFirefoxCount());
        Assert.assertEquals(1, stat.getOSLinuxCount());
    }

    public void test_agent_chrome() throws Exception {
        WebAppStat stat = new WebAppStat("");
        stat.computeUserAgent("Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16");
        Assert.assertEquals(0, stat.getBrowserIECount());
        Assert.assertEquals(1, stat.getBrowserChromeCount());
        Assert.assertEquals(1, stat.getOSWindowsCount());
    }
View Full Code Here

        Assert.assertEquals(1, stat.getBrowserChromeCount());
        Assert.assertEquals(1, stat.getOSWindowsCount());
    }

    public void test_agent_opera() throws Exception {
        WebAppStat stat = new WebAppStat("");
        stat.computeUserAgent("Opera/9.64 (Windows NT 5.1; U; en) Presto/2.1.1");
        Assert.assertEquals(0, stat.getBrowserIECount());
        Assert.assertEquals(1, stat.getOSWindowsCount());
        Assert.assertEquals(1, stat.getBrowserOperaCount());
    }
View Full Code Here

        Assert.assertEquals(1, stat.getOSWindowsCount());
        Assert.assertEquals(1, stat.getBrowserOperaCount());
    }

    public void test_agent_android22() throws Exception {
        WebAppStat stat = new WebAppStat("");
        stat.computeUserAgent("Mozilla/5.0 (Linux; U; Android 2.2.1; zh-cn; HTC_Wildfire_A3333 Build/FRG83D) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1");
        Assert.assertEquals(0, stat.getBrowserIECount());
        Assert.assertEquals(1, stat.getOSLinuxCount());
        Assert.assertEquals(1, stat.getOSAndroidCount());
        Assert.assertEquals(1, stat.getDeviceAndroidCount());
    }
View Full Code Here

TOP

Related Classes of com.alibaba.druid.support.http.stat.WebAppStat

Copyright © 2018 www.massapicom. 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.