コード例 #1
0
 static {
   ARGS =
       TestUtils.createData( //
           null, //
           new AbstractXIdObject(XId.newId()) {}, //
           new AbstractXIdObject(XId.newId(1, 2)) {});
 }
コード例 #2
0
 @Test(dataProvider = "flags")
 public void setXAndGetConfigurationBehaveAsExpeced(List<Boolean> flags) {
   // builder with no template
   XId linkConfigId = XId.newId();
   Builder builder = LinkConfiguration.builder(linkConfigId);
   for (Fragment fragment : Fragment.values()) {
     setConfigParameter(flags, builder, fragment);
   }
   LinkConfiguration linkConfig = builder.newInstance();
   assertThat(
       "", //
       linkConfig.getId(),
       isEqualTo(linkConfigId));
   for (Fragment fragment : Fragment.values()) {
     testConfigsParameter(flags, linkConfig, fragment, LinkConfiguration.DEFAULT_CONFIGURATION);
   }
   // builder with template
   linkConfigId = XId.newId();
   builder = LinkConfiguration.builder(linkConfigId).setTemplate(TEMPLATE);
   for (Fragment fragment : Fragment.values()) {
     setConfigParameter(flags, builder, fragment);
   }
   linkConfig = builder.newInstance();
   assertThat(
       "", //
       linkConfig.getId(),
       isEqualTo(linkConfigId));
   for (Fragment fragment : Fragment.values()) {
     testConfigsParameter(flags, linkConfig, fragment, TEMPLATE);
   }
 }
コード例 #3
0
 public void constructorSucceeds() {
   assertThat(
       "", //
       LinkConfiguration.builder(),
       isNotNull());
   assertThat(
       "", //
       LinkConfiguration.builder(XId.newId()),
       isNotNull());
 }