From f3b1d3489b2b39fb1f4dc8875bf38f3b44ec6ee9 Mon Sep 17 00:00:00 2001 From: Anjali Walsatwar Date: Tue, 27 Mar 2018 09:22:22 +0000 Subject: UT Coverage for mso-adapter-rest-interface UT Coverage for mso-adapter-rest-interface. Change-Id: Ib03912c9dbcec309be2cb04cfcea7cdb9c525bbd Issue-ID: SO-369 Signed-off-by: Anjali Walsatwar --- .../exceptions/MsoAdapterExceptionTest.java | 26 ++++++++++++++++++++ .../exceptions/MsoCloudIdentityNotFoundTest.java | 26 ++++++++++++++++++++ .../exceptions/MsoCloudSiteNotFoundTest.java | 27 +++++++++++++++++++++ .../openstack/exceptions/MsoIOExceptionTest.java | 26 ++++++++++++++++++++ .../exceptions/MsoNetworkAlreadyExistsTest.java | 25 +++++++++++++++++++ .../exceptions/MsoNetworkNotFoundTest.java | 25 +++++++++++++++++++ .../exceptions/MsoOpenstackExceptionTest.java | 28 ++++++++++++++++++++++ .../exceptions/MsoStackAlreadyExistsTest.java | 25 +++++++++++++++++++ .../openstack/exceptions/MsoStackNotFoundTest.java | 25 +++++++++++++++++++ .../exceptions/MsoTenantAlreadyExistsTest.java | 25 +++++++++++++++++++ .../exceptions/MsoTenantNotFoundTest.java | 25 +++++++++++++++++++ 11 files changed, 283 insertions(+) create mode 100644 adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoAdapterExceptionTest.java create mode 100644 adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoCloudIdentityNotFoundTest.java create mode 100644 adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoCloudSiteNotFoundTest.java create mode 100644 adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoIOExceptionTest.java create mode 100644 adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoNetworkAlreadyExistsTest.java create mode 100644 adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoNetworkNotFoundTest.java create mode 100644 adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoOpenstackExceptionTest.java create mode 100644 adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoStackAlreadyExistsTest.java create mode 100644 adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoStackNotFoundTest.java create mode 100644 adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoTenantAlreadyExistsTest.java create mode 100644 adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoTenantNotFoundTest.java (limited to 'adapters') diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoAdapterExceptionTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoAdapterExceptionTest.java new file mode 100644 index 0000000000..738fe9e4d9 --- /dev/null +++ b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoAdapterExceptionTest.java @@ -0,0 +1,26 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2018 Huawei Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.mso.openstack.exceptions; + +public class MsoAdapterExceptionTest { + MsoAdapterException msoAdapterException = new MsoAdapterException("test"); + MsoAdapterException msoAdapterExceptionThr = new MsoAdapterException("test" , new Throwable()); +} diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoCloudIdentityNotFoundTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoCloudIdentityNotFoundTest.java new file mode 100644 index 0000000000..4027aa6342 --- /dev/null +++ b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoCloudIdentityNotFoundTest.java @@ -0,0 +1,26 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2018 Huawei Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ +package org.openecomp.mso.openstack.exceptions; + +public class MsoCloudIdentityNotFoundTest { + MsoCloudIdentityNotFound msoCloudIdentityNotFound = new MsoCloudIdentityNotFound(); + MsoCloudIdentityNotFound msoCloudIdentityNotFoundStr = new MsoCloudIdentityNotFound("test"); + public String str = msoCloudIdentityNotFound.toString(); +} diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoCloudSiteNotFoundTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoCloudSiteNotFoundTest.java new file mode 100644 index 0000000000..cac02152e0 --- /dev/null +++ b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoCloudSiteNotFoundTest.java @@ -0,0 +1,27 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2018 Huawei Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ +package org.openecomp.mso.openstack.exceptions; + +public class MsoCloudSiteNotFoundTest { + MsoCloudSiteNotFound msoCloudSiteNotFound = new MsoCloudSiteNotFound(); + MsoCloudSiteNotFound msoCloudSiteNotFoundStr = new MsoCloudSiteNotFound("test"); + public String str = msoCloudSiteNotFoundStr.toString(); + +} diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoIOExceptionTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoIOExceptionTest.java new file mode 100644 index 0000000000..d1f4db778e --- /dev/null +++ b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoIOExceptionTest.java @@ -0,0 +1,26 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2018 Huawei Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ +package org.openecomp.mso.openstack.exceptions; + +public class MsoIOExceptionTest { + MsoIOException msoIOException = new MsoIOException("test"); + MsoIOException msoIOExceptionTh = new MsoIOException("test" , new Throwable()); + public String str = msoIOException.toString(); +} diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoNetworkAlreadyExistsTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoNetworkAlreadyExistsTest.java new file mode 100644 index 0000000000..c5217e4933 --- /dev/null +++ b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoNetworkAlreadyExistsTest.java @@ -0,0 +1,25 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2018 Huawei Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.mso.openstack.exceptions; + +public class MsoNetworkAlreadyExistsTest { + MsoNetworkAlreadyExists msoNetworkAlreadyExists = new MsoNetworkAlreadyExists("test","test","test"); +} diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoNetworkNotFoundTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoNetworkNotFoundTest.java new file mode 100644 index 0000000000..ea74efcf42 --- /dev/null +++ b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoNetworkNotFoundTest.java @@ -0,0 +1,25 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2018 Huawei Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.mso.openstack.exceptions; + +public class MsoNetworkNotFoundTest { + MsoNetworkNotFound msoNetworkNotFound =new MsoNetworkNotFound("test","test","test"); +} diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoOpenstackExceptionTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoOpenstackExceptionTest.java new file mode 100644 index 0000000000..58cea958df --- /dev/null +++ b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoOpenstackExceptionTest.java @@ -0,0 +1,28 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2018 Huawei Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.mso.openstack.exceptions; + +public class MsoOpenstackExceptionTest { + MsoOpenstackException msoOpenstackException= new MsoOpenstackException(404,"test","test"); + MsoOpenstackException msoOpenstackExceptionEx= new MsoOpenstackException(404,"test","test",new Exception()); + public String str = msoOpenstackException.toString(); + +} diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoStackAlreadyExistsTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoStackAlreadyExistsTest.java new file mode 100644 index 0000000000..f36ddfe7a1 --- /dev/null +++ b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoStackAlreadyExistsTest.java @@ -0,0 +1,25 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2018 Huawei Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.mso.openstack.exceptions; + +public class MsoStackAlreadyExistsTest { + MsoStackAlreadyExists msoStackAlreadyExists = new MsoStackAlreadyExists("test","test","test"); +} diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoStackNotFoundTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoStackNotFoundTest.java new file mode 100644 index 0000000000..e422c04fcc --- /dev/null +++ b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoStackNotFoundTest.java @@ -0,0 +1,25 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2018 Huawei Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.mso.openstack.exceptions; + +public class MsoStackNotFoundTest { + MsoStackNotFound msoStackNotFound = new MsoStackNotFound("test","test","test"); +} diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoTenantAlreadyExistsTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoTenantAlreadyExistsTest.java new file mode 100644 index 0000000000..d9e83063d1 --- /dev/null +++ b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoTenantAlreadyExistsTest.java @@ -0,0 +1,25 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2018 Huawei Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.mso.openstack.exceptions; + +public class MsoTenantAlreadyExistsTest { + MsoTenantAlreadyExists msoTenantAlreadyExists = new MsoTenantAlreadyExists("test","test"); +} diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoTenantNotFoundTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoTenantNotFoundTest.java new file mode 100644 index 0000000000..a8dd6c6afb --- /dev/null +++ b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/exceptions/MsoTenantNotFoundTest.java @@ -0,0 +1,25 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2018 Huawei Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.mso.openstack.exceptions; + +public class MsoTenantNotFoundTest { + MsoTenantNotFound msoTenantNotFound = new MsoTenantNotFound("test","test"); +} -- cgit 1.2.3-korg