/**
* Test the other constructors, as {@link TestModels} tests the other methods.
*/
-public class TestPolicyTypeIdent extends IdentTestBase<PolicyTypeIdent> {
+public class TestToscaPolicyIdentifier extends ToscaIdentifierTestBase<ToscaPolicyIdentifier> {
private static final String NAME = "my-name";
private static final String VERSION = "1.2.3";
- public TestPolicyTypeIdent() {
- super(PolicyTypeIdent.class);
+ public TestToscaPolicyIdentifier() {
+ super(ToscaPolicyIdentifier.class);
}
@Test
public void testAllArgsConstructor() {
- assertThatThrownBy(() -> new PolicyTypeIdent(null, VERSION)).isInstanceOf(NullPointerException.class);
- assertThatThrownBy(() -> new PolicyTypeIdent(NAME, null)).isInstanceOf(NullPointerException.class);
+ assertThatThrownBy(() -> new ToscaPolicyIdentifier(null, VERSION)).isInstanceOf(NullPointerException.class);
+ assertThatThrownBy(() -> new ToscaPolicyIdentifier(NAME, null)).isInstanceOf(NullPointerException.class);
- PolicyTypeIdent orig = new PolicyTypeIdent(NAME, VERSION);
+ ToscaPolicyIdentifier orig = new ToscaPolicyIdentifier(NAME, VERSION);
assertEquals(NAME, orig.getName());
assertEquals(VERSION, orig.getVersion());
}
@Test
public void testCopyConstructor() {
- assertThatThrownBy(() -> new PolicyTypeIdent(null)).isInstanceOf(NullPointerException.class);
+ assertThatThrownBy(() -> new ToscaPolicyIdentifier(null)).isInstanceOf(NullPointerException.class);
- PolicyTypeIdent orig = new PolicyTypeIdent();
+ ToscaPolicyIdentifier orig = new ToscaPolicyIdentifier();
// verify with null values
- assertEquals(orig.toString(), new PolicyTypeIdent(orig).toString());
+ assertEquals(orig.toString(), new ToscaPolicyIdentifier(orig).toString());
// verify with all values
- orig = new PolicyTypeIdent(NAME, VERSION);
- assertEquals(orig.toString(), new PolicyTypeIdent(orig).toString());
+ orig = new ToscaPolicyIdentifier(NAME, VERSION);
+ assertEquals(orig.toString(), new ToscaPolicyIdentifier(orig).toString());
}
-
}