Package thrift.test

Examples of thrift.test.StructB


  public void testSubStructValidation() throws Exception {
    StructA valid = new StructA("valid");
    StructA invalid = new StructA();

    StructB b = new StructB();
    try {
      b.validate();
      fail();
    } catch (TException e) {
      // expected
    }

    b = new StructB().setAb(valid);
    b.validate();

    b = new StructB().setAb(invalid);
    try {
      b.validate();
      fail();
    } catch (TException e) {
      // expected
    }

    b = new StructB().setAb(valid).setAa(invalid);
    try {
      b.validate();
      fail();
    } catch (TException e) {
      // expected
    }
  }
View Full Code Here

TOP

Related Classes of thrift.test.StructB

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.