Package org.apache.avro.ipc.specific

Examples of org.apache.avro.ipc.specific.PageView


 
  @Test
  public void testUnions() {
    long datetime = 1234L;
    String product = "widget";
    PageView p = PageView.newBuilder()
      .setDatetime(1234L)
      .setPageContext(ProductPage.newBuilder()
          .setProduct(product)
          .build())
      .build();
    Assert.assertEquals(datetime, p.getDatetime().longValue());
    Assert.assertEquals(ProductPage.class, p.getPageContext().getClass());
    Assert.assertEquals(product, ((ProductPage)p.getPageContext()).getProduct());
   
    PageView p2 = PageView.newBuilder(p).build();
   
    Assert.assertEquals(datetime, p2.getDatetime().longValue());
    Assert.assertEquals(ProductPage.class, p2.getPageContext().getClass());
    Assert.assertEquals(product, ((ProductPage)p2.getPageContext()).getProduct());
   
    Assert.assertEquals(p, p2);
   
  }
View Full Code Here


 
  @Test
  public void testUnions() {
    long datetime = 1234L;
    String product = "widget";
    PageView p = PageView.newBuilder()
      .setDatetime(1234L)
      .setPageContext(ProductPage.newBuilder()
          .setProduct(product)
          .build())
      .build();
    Assert.assertEquals(datetime, p.getDatetime().longValue());
    Assert.assertEquals(ProductPage.class, p.getPageContext().getClass());
    Assert.assertEquals(product, ((ProductPage)p.getPageContext()).getProduct());
   
    PageView p2 = PageView.newBuilder(p).build();
   
    Assert.assertEquals(datetime, p2.getDatetime().longValue());
    Assert.assertEquals(ProductPage.class, p2.getPageContext().getClass());
    Assert.assertEquals(product, ((ProductPage)p2.getPageContext()).getProduct());
   
    Assert.assertEquals(p, p2);
   
  }
View Full Code Here

 
  @Test
  public void testUnions() {
    long datetime = 1234L;
    String product = "widget";
    PageView p = PageView.newBuilder()
      .setDatetime(1234L)
      .setPageContext(ProductPage.newBuilder()
          .setProduct(product)
          .build())
      .build();
    Assert.assertEquals(datetime, p.getDatetime().longValue());
    Assert.assertEquals(ProductPage.class, p.getPageContext().getClass());
    Assert.assertEquals(product, ((ProductPage)p.getPageContext()).getProduct());
   
    PageView p2 = PageView.newBuilder(p).build();
   
    Assert.assertEquals(datetime, p2.getDatetime().longValue());
    Assert.assertEquals(ProductPage.class, p2.getPageContext().getClass());
    Assert.assertEquals(product, ((ProductPage)p2.getPageContext()).getProduct());
   
    Assert.assertEquals(p, p2);
   
  }
View Full Code Here

TOP

Related Classes of org.apache.avro.ipc.specific.PageView

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.