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