use of com.google.api.codegen.util.go.GoTypeTable in project toolkit by googleapis.
the class GoModelTypeNameConverterTest method testGetEnumValue.
@Test
public void testGetEnumValue() {
TypeRef type = ModelTypeNameConverterTestUtil.getTestEnumType(tempDir);
EnumValue value = type.getEnumType().getValues().get(0);
Truth.assertThat(converter.getEnumValue(type, value).getValueAndSaveTypeNicknameIn(new GoTypeTable())).isEqualTo("librarypb.Book_GOOD");
type = ModelTypeNameConverterTestUtil.getTestType(tempDir, "TopLevelEnum");
value = type.getEnumType().getValues().get(0);
Truth.assertThat(converter.getEnumValue(type, value).getValueAndSaveTypeNicknameIn(new GoTypeTable())).isEqualTo("librarypb.TopLevelEnum_FOO");
}
Aggregations