FeatureSupportTest.java 文件源码

java
阅读 25 收藏 0 点赞 0 评论 0

项目:outland 作者:
@Test
public void testToFeature() throws Exception {

  Feature feature = Feature.newBuilder()
      .setId("id1")
      .setKey("key1")
      .setGroup("app1")
      .setDescription("desc1")
      .setStatus(Status.off)
      .build();

  final String json = JsonFormat.printer().print(feature);

  final Feature feature1 = FeatureSupport.toFeature(json);

  assertEquals(feature.getId(), feature1.getId());
  assertEquals(feature.getKey(), feature1.getKey());
  assertEquals(feature.getGroup(), feature1.getGroup());
  assertEquals(feature.getDescription(), feature1.getDescription());
  assertEquals(feature.getStatus(), feature1.getStatus());

}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号