Package org.apache.shindig.common.util

Examples of org.apache.shindig.common.util.FakeTimeSource


  private BasicBlobCrypter crypter;
  private FakeTimeSource timeSource;

  public BlobCrypterTest() {
    crypter = new BasicBlobCrypter("0123456789abcdef".getBytes());
    timeSource = new FakeTimeSource();
    crypter.timeSource = timeSource;
  }
View Full Code Here


  private BasicBlobCrypter crypter;
 
  public CryptoTest() {
    crypter = new BasicBlobCrypter("0123456789abcdef".getBytes());
    crypter.timeSource = new FakeTimeSource();
  }
View Full Code Here

  private FakeTimeSource timeSource;
  private Cache<String, String> cache;

  @Override
  public void setUp() throws Exception {
    timeSource = new FakeTimeSource(0);
    cache = new LruCache<String, String>(5);
  }
View Full Code Here

  private BasicBlobCrypter crypter;
  private FakeTimeSource timeSource;

  public BlobCrypterTest() {
    crypter = new BasicBlobCrypter("0123456789abcdef".getBytes());
    timeSource = new FakeTimeSource();
    crypter.timeSource = timeSource;
  }
View Full Code Here

public class CryptoTest {
  private BasicBlobCrypter crypter;

  public CryptoTest() {
    crypter = new BasicBlobCrypter("0123456789abcdef".getBytes());
    crypter.timeSource = new FakeTimeSource();
  }
View Full Code Here

        .addHeader("h2", "v2").setStrictNoCache().create();

    HttpServletResponse servletResponse = EasyMock.createMock(HttpServletResponse.class);
    HttpServletResponseRecorder recorder = new HttpServletResponseRecorder(servletResponse);
   
    FakeTimeSource fakeTime = new FakeTimeSource();
    HttpUtil.setTimeSource(fakeTime);
    ServletUtil.copyResponseToServlet(response, recorder);
   
    assertEquals(200, recorder.getHttpStatusCode());
    assertEquals("response string", recorder.getResponseAsString());
View Full Code Here

TOP

Related Classes of org.apache.shindig.common.util.FakeTimeSource

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.