Example usage for org.apache.thrift.meta_data FieldMetaData FieldMetaData

List of usage examples for org.apache.thrift.meta_data FieldMetaData FieldMetaData

Introduction

In this page you can find the example usage for org.apache.thrift.meta_data FieldMetaData FieldMetaData.

Prototype

public FieldMetaData(String name, byte req, FieldValueMetaData vMetaData) 

Source Link

Usage

From source file:com.linecorp.armeria.server.thrift.ThriftDocServicePluginTest.java

License:Apache License

@Test
public void testNewExceptionInfo() throws Exception {
    final ExceptionInfo exception = newExceptionInfo(FooServiceException.class);

    assertThat(exception).isEqualTo(new ExceptionInfo(FooServiceException.class.getName(),
            ImmutableList.of(newFieldInfo(FooServiceException.class, new FieldMetaData("stringVal",
                    TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING, false))))));
}

From source file:com.linecorp.armeria.server.thrift.ThriftServiceSpecificationGeneratorTest.java

License:Apache License

@Test
public void testNewExceptionInfo() throws Exception {
    final ExceptionInfo exception = newExceptionInfo(FooServiceException.class, emptyMap());

    assertThat(exception).isEqualTo(new ExceptionInfo(FooServiceException.class.getName(),
            ImmutableList.of(newFieldInfo(
                    new FieldMetaData("stringVal", TFieldRequirementType.DEFAULT,
                            new FieldValueMetaData(TType.STRING, false)),
                    FooServiceException.class.getName(), emptyMap()))));
}