/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
+ * Copyright (C) 2019-2021 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import static org.junit.Assert.assertEquals;
import java.util.LinkedHashMap;
-
import org.junit.Test;
/**
public void testToscaPolicyType() {
assertThatThrownBy(() -> {
new ToscaPolicyType(null);
- }).hasMessage("copyObject is marked @NonNull but is null");
+ }).hasMessageMatching("copyObject is marked .*on.*ull but is null");
ToscaPolicyType tpt = new ToscaPolicyType();
tpt.setName("AType");
tpt.setDescription("Desc");
ToscaPolicyType clonedTpt0 = new ToscaPolicyType(tpt);
- assertEquals(0, tpt.compareTo(clonedTpt0));
+ assertEquals(0, new ToscaEntityComparator<ToscaPolicyType>().compare(tpt, clonedTpt0));
tpt.setMetadata(new LinkedHashMap<>());
tpt.setProperties(new LinkedHashMap<>());
tpt.getProperties().put("Property0", tp);
ToscaPolicyType clonedTpt1 = new ToscaPolicyType(tpt);
- assertEquals(0, tpt.compareTo(clonedTpt1));
+ assertEquals(0, new ToscaEntityComparator<ToscaPolicyType>().compare(tpt, clonedTpt1));
}
}