@Test public void getStringValue() { TestPlanDefinition planDefinition = new TestPlanDefinition(); BaseExtensionUtils.setStringValue( "testUrl", planDefinition, "My Test", TypeFactory::createType ); Assert.assertEquals( "My Test", BaseExtensionUtils.getStringValue( "testUrl", planDefinition ) ); }
@Nullable protected static String getStringValue( @Nonnull String url, @Nonnull IBaseHasExtensions resource ) { final IBaseDatatype value = getValue( url, resource ); if ( value instanceof IPrimitiveType ) { return ( (IPrimitiveType) value ).getValueAsString(); } return null; }
BaseExtensionUtils { @Nullable protected static String getStringValue( @Nonnull String url, @Nonnull IBaseHasExtensions resource ) { final IBaseDatatype value = getValue( url, resource ); if ( value instanceof IPrimitiveType ) { return ( (IPrimitiveType) value ).getValueAsString(); } return null; } }
BaseExtensionUtils { @Nullable protected static String getStringValue( @Nonnull String url, @Nonnull IBaseHasExtensions resource ) { final IBaseDatatype value = getValue( url, resource ); if ( value instanceof IPrimitiveType ) { return ( (IPrimitiveType) value ).getValueAsString(); } return null; } private  BaseExtensionUtils(); }
BaseExtensionUtils { @Nullable protected static String getStringValue( @Nonnull String url, @Nonnull IBaseHasExtensions resource ) { final IBaseDatatype value = getValue( url, resource ); if ( value instanceof IPrimitiveType ) { return ( (IPrimitiveType) value ).getValueAsString(); } return null; } private  BaseExtensionUtils();  }
BaseExtensionUtils { @Nullable protected static String getStringValue( @Nonnull String url, @Nonnull IBaseHasExtensions resource ) { final IBaseDatatype value = getValue( url, resource ); if ( value instanceof IPrimitiveType ) { return ( (IPrimitiveType) value ).getValueAsString(); } return null; } private  BaseExtensionUtils();   }