Package ru.decipher.proxy.impl

Source Code of ru.decipher.proxy.impl.RandomUserAgentManagerTest

package ru.decipher.proxy.impl;

import org.junit.Before;
import org.junit.Test;
import ru.decipher.extraction.http.impl.BasicHttpRequest;

import static junit.framework.Assert.assertNotNull;

/**
* User: Alexander Paderin (apocarteres@gmail.com)
* Date: 1/20/14
* Time: 8:47 AM
*/
public class RandomUserAgentManagerTest {

    private RandomUserAgentManager manager;

    @Before
    public void setUp() throws Exception {
        manager = new RandomUserAgentManager();
    }

    @Test
    public void testThatUserAgentIsNotNull() throws Exception {
        BasicHttpRequest request = new BasicHttpRequest();
        manager.populate(request);
        assertNotNull(request.getRequestHeaders().get("User-Agent"));
    }
}
TOP

Related Classes of ru.decipher.proxy.impl.RandomUserAgentManagerTest

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.