/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019-2020 Nordix Foundation.
+ * Copyright (C) 2019-2021 Nordix Foundation.
* Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
assertThatThrownBy(() -> {
originalServiceTemplate.fromAuthorative(toscaServiceTemplate);
- }).hasMessage("PolicyType type not specified, the type of the PolicyType for this policy must be "
- + "specified in the type field");
+ }).hasMessage("Type not specified, the type of this TOSCA entity must be specified in the type field");
toscaPolicy.setType("IDontExist");
assertThatThrownBy(() -> {
originalServiceTemplate.fromAuthorative(toscaServiceTemplate);
- }).hasMessage("PolicyType version not specified, the version of the PolicyType for this policy must be "
+ }).hasMessage("Version not specified, the version of this TOSCA entity must be "
+ "specified in the type_version field");
toscaPolicy.setTypeVersion("hello");
assertThatThrownBy(() -> {
new SimpleToscaProvider().createPolicies(pfDao, originalServiceTemplate);
}).hasMessageContaining("policy type").hasMessageContaining("IDontExist:99.100.101")
- .hasMessageContaining(Validated.NOT_FOUND);
+ .hasMessageContaining(Validated.NOT_FOUND);
toscaPolicy.setType("IDontExist");
originalServiceTemplate.fromAuthorative(toscaServiceTemplate);
assertThatThrownBy(() -> {
originalServiceTemplate.fromAuthorative(toscaServiceTemplate);
- }).hasMessage("PolicyType type not specified, the type of the PolicyType for this policy must be "
- + "specified in the type field");
+ }).hasMessage("Type not specified, the type of this TOSCA entity must be specified in the type field");
toscaPolicy.setType(originalPolicyType);
toscaPolicy.setTypeVersion(originalPolicyTypeVersion);
serviceTemplateFragment.getPolicyTypes().getConceptMap().put(badPt.getKey(), badPt);
assertThatThrownBy(() -> new SimpleToscaProvider().appendToServiceTemplate(pfDao, serviceTemplateFragment))
- .hasMessageContaining("key on concept entry").hasMessageContaining("NULL:0.0.0")
- .hasMessageContaining(Validated.IS_A_NULL_KEY);
+ .hasMessageContaining("key on concept entry").hasMessageContaining("NULL:0.0.0")
+ .hasMessageContaining(Validated.IS_A_NULL_KEY);
}
@Test