use of com.google.api.codegen.util.csharp.CSharpTypeTable in project toolkit by googleapis.
the class CSharpModelTypeNameConverterTest method testGetEnumValue.
@Test
public void testGetEnumValue() {
String packageName = "Google.Example.Library.V1";
TypeRef type = ModelTypeNameConverterTestUtil.getTestEnumType(tempDir);
EnumValue value = type.getEnumType().getValues().get(0);
CSharpModelTypeNameConverter converter = new CSharpModelTypeNameConverter(packageName);
Truth.assertThat(converter.getEnumValue(type, value).getValueAndSaveTypeNicknameIn(new CSharpTypeTable(packageName))).isEqualTo("Book.Types.Rating.Good");
}
Aggregations