2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.openecomp.sdc.be.model;
23 import org.junit.Test;
24 import org.openecomp.sdc.be.datatypes.elements.ArtifactDataDefinition;
25 import org.openecomp.sdc.be.datatypes.elements.ListDataDefinition;
26 import org.openecomp.sdc.be.datatypes.elements.OperationDataDefinition;
28 public class OperationTest {
30 private Operation createTestSubject() {
31 return new Operation();
35 public void testCtor() throws Exception {
36 new Operation(new OperationDataDefinition());
37 new Operation(new ArtifactDataDefinition(), "mock", new ListDataDefinition<>(), new ListDataDefinition<>());
41 public void testIsDefinition() throws Exception {
42 Operation testSubject;
46 testSubject = createTestSubject();
47 result = testSubject.isDefinition();
51 public void testSetDefinition() throws Exception {
52 Operation testSubject;
53 boolean definition = false;
56 testSubject = createTestSubject();
57 testSubject.setDefinition(definition);
61 public void testToString() throws Exception {
62 Operation testSubject;
66 testSubject = createTestSubject();
67 result = testSubject.toString();
71 public void testGetImplementationArtifact() throws Exception {
72 Operation testSubject;
73 ArtifactDefinition result;
76 testSubject = createTestSubject();
77 result = testSubject.getImplementationArtifact();
78 testSubject.setImplementation(new ArtifactDataDefinition());
79 result = testSubject.getImplementationArtifact();