Package com.twitter.elephantbird.thrift.test

Examples of com.twitter.elephantbird.thrift.test.TestUnion


    assertTrue( // the order of elements in map could vary because of HashMap
        tupleString.equals("(bob,jenkins)-{MOBILE=650-555-5555, WORK=415-555-5555, HOME=408-555-5555}") ||
        tupleString.equals("(bob,jenkins)-{MOBILE=650-555-5555, HOME=408-555-5555, WORK=415-555-5555}"));

    // Test Union:
    TestUnion unionInt = new TestUnion();
    unionInt.setI32Type(10);
    assertEquals(",10,,,", toTuple(type, unionInt).toDelimitedString(","));

    TestUnion unionStr = new TestUnion();
    unionStr.setI32Type(-1); // is overridden below.
    unionStr.setStringType("abcd");
    assertEquals("abcd,,,,", toTuple(type, unionStr).toDelimitedString(","));
  }
View Full Code Here

TOP

Related Classes of com.twitter.elephantbird.thrift.test.TestUnion

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.