Package com.linkedin.pegasus.generator.examples

Examples of com.linkedin.pegasus.generator.examples.Foo


  {
    Map<CompoundKey, Foo> results = new HashMap<CompoundKey, Foo>();
    CompoundKey c1 = new CompoundKey().append("a", "a1").append("b", 1);
    CompoundKey c2 = new CompoundKey().append("a", "a2").append("b", 2);
    CompoundKey c3 = new CompoundKey().append("a", "a3").append("b", 3);
    Foo record1 = new Foo().setStringField("record1");
    Foo record2 = new Foo().setStringField("record2");
    results.put(c1, record1);
    results.put(c2, record2);

    Map<String, Foo> protocol1TransformedResults = new HashMap<String, Foo>();
    protocol1TransformedResults.put("a=a1&b=1", record1);
View Full Code Here


  @DataProvider(name = "exceptionTestData")
  public Object[][] exceptionDataProvider()
  {
    Map<Long, Foo> results = new HashMap<Long, Foo>();
    Foo f1 = new Foo().setStringField("f1");
    Foo f2 = new Foo().setStringField("f2");
    results.put(null, f1);
    results.put(1L, f2);

    BatchResult<Long, Foo> batchResult = new BatchResult<Long, Foo>(Collections.singletonMap(1L, f1),
                                                                    Collections.<Long, HttpStatus>singletonMap(null, HttpStatus.S_404_NOT_FOUND),
View Full Code Here

*/
public class TestCollectionResponseBuilder
{
  @DataProvider(name = "testData")
  public Object[][] dataProvider() {
    Foo metadata = new Foo().setStringField("metadata");
    final List<Foo> generatedList = generateTestList();
    CollectionResult<Foo, Foo> collectionResult = new CollectionResult<Foo, Foo>(generatedList, generatedList.size(), metadata);

    return new Object[][]
        {
            {generatedList, null},
            {collectionResult, metadata.data()},
        };
  }
View Full Code Here

  }

  @DataProvider(name = "exceptionTestData")
  public Object[][] exceptionDataProvider()
  {
    Foo f1 = new Foo().setStringField("f1");

    return new Object[][]
        {
            {Arrays.asList(f1, null),
                "Unexpected null encountered. Null element inside of a List returned by the resource method: "},
View Full Code Here

    return mockDescriptor;
  }

  private static List<Foo> generateTestList()
  {
    Foo f1 = new Foo().setStringField("f1");
    Foo f2 = new Foo().setStringField("f2");
    List<Foo> results = Arrays.asList(f1, f2);
    return results;
  }
View Full Code Here

    return mockContext;
  }

  private static Foo getRecord()
  {
    return new Foo().setStringField("foo").setBooleanField(false);
  }
View Full Code Here

    return new Foo().setStringField("foo").setBooleanField(false);
  }

  private static Foo getProjectedRecord()
  {
    return new Foo().setStringField("foo");
  }
View Full Code Here

TOP

Related Classes of com.linkedin.pegasus.generator.examples.Foo

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.