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

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


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

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


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

    public void test_agent_ie8_x2() throws Exception {
        WebAppStat stat = new WebAppStat("");
        stat.computeUserAgent("Mozilla/4.0 (compatible; GoogleToolbar 7.2.2427.2330; Windows XP 5.1; MSIE 8.0.6001.18702)");
        Assert.assertEquals(1, stat.getBrowserIECount());
        Assert.assertEquals(1, stat.getBrowserIE8Count());
        Assert.assertEquals(1, stat.getOSWindowsCount());
    }
View Full Code Here

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

    public void test_agent_ie8_x3() throws Exception {
        WebAppStat stat = new WebAppStat("");
        stat.computeUserAgent("Mozilla/4.0 (compatible; GoogleToolbar 7.3.2710.138; Windows 6.1; MSIE 8.0.7601.17514)");
        Assert.assertEquals(1, stat.getBrowserIECount());
        Assert.assertEquals(1, stat.getBrowserIE8Count());
        Assert.assertEquals(1, stat.getOSWindowsCount());
    }
View Full Code Here

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

    public void test_agent_ie7() throws Exception {
        WebAppStat stat = new WebAppStat("");
        stat.computeUserAgent("Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Tablet PC 2.0; MAXTHON 2.0)");
        Assert.assertEquals(1, stat.getBrowserIECount());
        Assert.assertEquals(1, stat.getBrowserIE7Count());
        Assert.assertEquals(1, stat.getOSWindowsCount());
    }
View Full Code Here

        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.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.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.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.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.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

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.