From ddbb344825aac39b7523babb66df754704daa2d1 Mon Sep 17 00:00:00 2001 From: subhash kumar singh Date: Sun, 11 Feb 2018 11:53:05 +0000 Subject: Improve code coverage for libs Improve code coverage for libs. Change-Id: I4b745bfec1c4c857d169b1726d80c02f1cb8e20e Issue-ID: SO-369 Signed-off-by: subhash kumar singh --- .../keystone/v3/model/AuthenticationTest.java | 44 ++++++++ .../keystone/v3/model/CredentialTest.java | 76 +++++++++++++ .../keystone/v3/model/CredentialsTest.java | 33 ++++++ .../openstack/keystone/v3/model/DomainTest.java | 64 +++++++++++ .../openstack/keystone/v3/model/DomainsTest.java | 34 ++++++ .../openstack/keystone/v3/model/EndpointTest.java | 64 +++++++++++ .../openstack/keystone/v3/model/EndpointsTest.java | 34 ++++++ .../openstack/keystone/v3/model/GroupTest.java | 64 +++++++++++ .../openstack/keystone/v3/model/GroupsTest.java | 33 ++++++ .../openstack/keystone/v3/model/PoliciesTest.java | 34 ++++++ .../openstack/keystone/v3/model/PolicyTest.java | 76 +++++++++++++ .../openstack/keystone/v3/model/ProjectTest.java | 64 +++++++++++ .../openstack/keystone/v3/model/ProjectsTest.java | 34 ++++++ .../openstack/keystone/v3/model/RoleTest.java | 59 ++++++++++ .../openstack/keystone/v3/model/RolesTest.java | 34 ++++++ .../openstack/keystone/v3/model/ServiceTest.java | 64 +++++++++++ .../openstack/keystone/v3/model/ServicesTest.java | 34 ++++++ .../openstack/keystone/v3/model/TokenTest.java | 119 +++++++++++++++++++++ .../openstack/keystone/v3/model/UserTest.java | 104 ++++++++++++++++++ .../openstack/keystone/v3/model/UsersTest.java | 34 ++++++ 20 files changed, 1102 insertions(+) create mode 100644 keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/AuthenticationTest.java create mode 100644 keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/CredentialTest.java create mode 100644 keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/CredentialsTest.java create mode 100644 keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/DomainTest.java create mode 100644 keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/DomainsTest.java create mode 100644 keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/EndpointTest.java create mode 100644 keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/EndpointsTest.java create mode 100644 keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/GroupTest.java create mode 100644 keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/GroupsTest.java create mode 100644 keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/PoliciesTest.java create mode 100644 keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/PolicyTest.java create mode 100644 keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/ProjectTest.java create mode 100644 keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/ProjectsTest.java create mode 100644 keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/RoleTest.java create mode 100644 keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/RolesTest.java create mode 100644 keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/ServiceTest.java create mode 100644 keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/ServicesTest.java create mode 100644 keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/TokenTest.java create mode 100644 keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/UserTest.java create mode 100644 keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/UsersTest.java (limited to 'keystone-model/src/test/java/com/woorea/openstack') diff --git a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/AuthenticationTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/AuthenticationTest.java new file mode 100644 index 0000000..75f4a5c --- /dev/null +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/AuthenticationTest.java @@ -0,0 +1,44 @@ +/*- + * ============LICENSE_START======================================================= + * 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 com.woorea.openstack.keystone.v3.model; + +import org.junit.Test; + +public class AuthenticationTest { + + Authentication authentication = new Authentication(); + + @Test + public void getIdentity() throws Exception { + authentication.getIdentity(); + } + + @Test + public void setIdentity() throws Exception { + authentication.setIdentity(new Authentication.Identity()); + } + + @Test + public void getScope() throws Exception { + authentication.getScope(); + } + + @Test + public void setScope() throws Exception { + authentication.setScope(new Authentication.Scope()); + } + +} \ No newline at end of file diff --git a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/CredentialTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/CredentialTest.java new file mode 100644 index 0000000..6aa793e --- /dev/null +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/CredentialTest.java @@ -0,0 +1,76 @@ +/*- + * ============LICENSE_START======================================================= + * 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 com.woorea.openstack.keystone.v3.model; + +import org.junit.Test; + +import java.util.HashMap; + +public class CredentialTest { + + Credential credential = new Credential(); + + @Test + public void getId() throws Exception { + credential.getId(); + } + + @Test + public void setId() throws Exception { + credential.setId("test"); + } + + @Test + public void getProjectId() throws Exception { + credential.getProjectId(); + } + + @Test + public void setProjectId() throws Exception { + credential.setProjectId("test"); + } + + @Test + public void getType() throws Exception { + credential.getType(); + } + + @Test + public void setType() throws Exception { + credential.setType("test"); + } + + @Test + public void getUserId() throws Exception { + credential.getUserId(); + } + + @Test + public void setUserId() throws Exception { + credential.setUserId("test"); + } + + @Test + public void getBlob() throws Exception { + credential.getBlob(); + } + + @Test + public void setBlob() throws Exception { + credential.setBlob(new HashMap()); + } + +} \ No newline at end of file diff --git a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/CredentialsTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/CredentialsTest.java new file mode 100644 index 0000000..dfe2918 --- /dev/null +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/CredentialsTest.java @@ -0,0 +1,33 @@ +/*- + * ============LICENSE_START======================================================= + * 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 com.woorea.openstack.keystone.v3.model; + +import org.junit.Test; + +public class CredentialsTest { + + Credentials credentials = new Credentials(); + + @Test + public void getList() throws Exception { + credentials.getList(); + } + + @Test(expected = NullPointerException.class) + public void iterator() throws Exception { + credentials.iterator(); + } +} \ No newline at end of file diff --git a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/DomainTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/DomainTest.java new file mode 100644 index 0000000..6066af5 --- /dev/null +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/DomainTest.java @@ -0,0 +1,64 @@ +/*- + * ============LICENSE_START======================================================= + * 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 com.woorea.openstack.keystone.v3.model; + +import org.junit.Test; + +public class DomainTest { + + Domain domain = new Domain(); + + @Test + public void getId() throws Exception { + domain.getId(); + } + + @Test + public void setId() throws Exception { + domain.setId("test"); + } + + @Test + public void getName() throws Exception { + domain.getName(); + } + + @Test + public void setName() throws Exception { + domain.setName("test"); + } + + @Test + public void getDescription() throws Exception { + domain.getDescription(); + } + + @Test + public void setDescription() throws Exception { + domain.setDescription("test"); + } + + @Test + public void getEnabled() throws Exception { + domain.getEnabled(); + } + + @Test + public void setEnabled() throws Exception { + domain.setEnabled(true); + } + +} \ No newline at end of file diff --git a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/DomainsTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/DomainsTest.java new file mode 100644 index 0000000..38f6a99 --- /dev/null +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/DomainsTest.java @@ -0,0 +1,34 @@ +/*- + * ============LICENSE_START======================================================= + * 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 com.woorea.openstack.keystone.v3.model; + +import org.junit.Test; + +public class DomainsTest { + + Domains domains = new Domains(); + + @Test + public void getList() throws Exception { + domains.getList(); + } + + @Test(expected = NullPointerException.class) + public void iterator() throws Exception { + domains.iterator(); + } + +} \ No newline at end of file diff --git a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/EndpointTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/EndpointTest.java new file mode 100644 index 0000000..73a0c7c --- /dev/null +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/EndpointTest.java @@ -0,0 +1,64 @@ +/*- + * ============LICENSE_START======================================================= + * 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 com.woorea.openstack.keystone.v3.model; + +import org.junit.Test; + +public class EndpointTest { + + Endpoint endpoint = new Endpoint(); + + @Test + public void getId() throws Exception { + endpoint.getId(); + } + + @Test + public void setId() throws Exception { + endpoint.setId("test"); + } + + @Test + public void getInterface() throws Exception { + endpoint.getInterface(); + } + + @Test + public void setInterface() throws Exception { + endpoint.setInterface("test"); + } + + @Test + public void getName() throws Exception { + endpoint.getName(); + } + + @Test + public void setName() throws Exception { + endpoint.setName("test"); + } + + @Test + public void getServiceId() throws Exception { + endpoint.getServiceId(); + } + + @Test + public void setServiceId() throws Exception { + endpoint.setServiceId("test"); + } + +} \ No newline at end of file diff --git a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/EndpointsTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/EndpointsTest.java new file mode 100644 index 0000000..321e872 --- /dev/null +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/EndpointsTest.java @@ -0,0 +1,34 @@ +/*- + * ============LICENSE_START======================================================= + * 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 com.woorea.openstack.keystone.v3.model; + +import org.junit.Test; + +public class EndpointsTest { + + Endpoints endpoints = new Endpoints(); + + @Test + public void getList() throws Exception { + endpoints.getList(); + } + + @Test(expected = NullPointerException.class) + public void iterator() throws Exception { + endpoints.iterator(); + } + +} \ No newline at end of file diff --git a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/GroupTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/GroupTest.java new file mode 100644 index 0000000..a592e81 --- /dev/null +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/GroupTest.java @@ -0,0 +1,64 @@ +/*- + * ============LICENSE_START======================================================= + * 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 com.woorea.openstack.keystone.v3.model; + +import org.junit.Test; + +public class GroupTest { + + Group group = new Group(); + + @Test + public void getId() throws Exception { + group.getId(); + } + + @Test + public void setId() throws Exception { + group.setId("test"); + } + + @Test + public void getDomainId() throws Exception { + group.getDomainId(); + } + + @Test + public void setDomainId() throws Exception { + group.setDomainId("test"); + } + + @Test + public void getName() throws Exception { + group.getName(); + } + + @Test + public void setName() throws Exception { + group.setName("test"); + } + + @Test + public void getDescription() throws Exception { + group.getDescription(); + } + + @Test + public void setDescription() throws Exception { + group.setDescription("test"); + } + +} \ No newline at end of file diff --git a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/GroupsTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/GroupsTest.java new file mode 100644 index 0000000..5e6287d --- /dev/null +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/GroupsTest.java @@ -0,0 +1,33 @@ +/*- + * ============LICENSE_START======================================================= + * 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 com.woorea.openstack.keystone.v3.model; + +import org.junit.Test; + +public class GroupsTest { + + Groups groups = new Groups(); + + @Test + public void getList() throws Exception { + groups.getList(); + } + + @Test(expected = NullPointerException.class) + public void iterator() throws Exception { + groups.iterator(); + } +} \ No newline at end of file diff --git a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/PoliciesTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/PoliciesTest.java new file mode 100644 index 0000000..f037dac --- /dev/null +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/PoliciesTest.java @@ -0,0 +1,34 @@ +/*- + * ============LICENSE_START======================================================= + * 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 com.woorea.openstack.keystone.v3.model; + +import org.junit.Test; + +public class PoliciesTest { + + Policies policies = new Policies(); + + @Test + public void getList() throws Exception { + policies.getList(); + } + + @Test(expected = NullPointerException.class) + public void iterator() throws Exception { + policies.iterator(); + } + +} \ No newline at end of file diff --git a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/PolicyTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/PolicyTest.java new file mode 100644 index 0000000..cd90e1a --- /dev/null +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/PolicyTest.java @@ -0,0 +1,76 @@ +/*- + * ============LICENSE_START======================================================= + * 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 com.woorea.openstack.keystone.v3.model; + +import org.junit.Test; + +import java.util.HashMap; + +public class PolicyTest { + + Policy policy = new Policy(); + + @Test + public void getId() throws Exception { + policy.getId(); + } + + @Test + public void setId() throws Exception { + policy.setId("test"); + } + + @Test + public void getProjectId() throws Exception { + policy.getProjectId(); + } + + @Test + public void setProjectId() throws Exception { + policy.setProjectId("test"); + } + + @Test + public void getType() throws Exception { + policy.getType(); + } + + @Test + public void setType() throws Exception { + policy.setType("test"); + } + + @Test + public void getUserId() throws Exception { + policy.getUserId(); + } + + @Test + public void setUserId() throws Exception { + policy.setUserId("test"); + } + + @Test + public void getBlob() throws Exception { + policy.getBlob(); + } + + @Test + public void setBlob() throws Exception { + policy.setBlob(new HashMap()); + } + +} \ No newline at end of file diff --git a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/ProjectTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/ProjectTest.java new file mode 100644 index 0000000..63731ce --- /dev/null +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/ProjectTest.java @@ -0,0 +1,64 @@ +/*- + * ============LICENSE_START======================================================= + * 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 com.woorea.openstack.keystone.v3.model; + +import org.junit.Test; + +public class ProjectTest { + + Project project = new Project(); + + @Test + public void getId() throws Exception { + project.getId(); + } + + @Test + public void setId() throws Exception { + project.setId("test"); + } + + @Test + public void getDomainId() throws Exception { + project.getDomainId(); + } + + @Test + public void setDomainId() throws Exception { + project.setDomainId("test"); + } + + @Test + public void getName() throws Exception { + project.getName(); + } + + @Test + public void setName() throws Exception { + project.setName("test"); + } + + @Test + public void getEnabled() throws Exception { + project.getEnabled(); + } + + @Test + public void setEnabled() throws Exception { + project.setEnabled(true); + } + +} \ No newline at end of file diff --git a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/ProjectsTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/ProjectsTest.java new file mode 100644 index 0000000..4c32491 --- /dev/null +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/ProjectsTest.java @@ -0,0 +1,34 @@ +/*- + * ============LICENSE_START======================================================= + * 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 com.woorea.openstack.keystone.v3.model; + +import org.junit.Test; + +public class ProjectsTest { + + Projects projects = new Projects(); + + @Test + public void getList() throws Exception { + projects.getList(); + } + + @Test(expected = NullPointerException.class) + public void iterator() throws Exception { + projects.iterator(); + } + +} \ No newline at end of file diff --git a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/RoleTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/RoleTest.java new file mode 100644 index 0000000..93afd0e --- /dev/null +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/RoleTest.java @@ -0,0 +1,59 @@ +/*- + * ============LICENSE_START======================================================= + * 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 com.woorea.openstack.keystone.v3.model; + +import org.junit.Test; + +public class RoleTest { + + Role role = new Role(); + + @Test + public void getId() throws Exception { + role.getId(); + } + + @Test + public void getName() throws Exception { + role.getName(); + } + + @Test + public void setName() throws Exception { + role.setName("test"); + } + + @Test + public void getDescription() throws Exception { + role.getDescription(); + } + + @Test + public void setDescription() throws Exception { + role.setDescription("test"); + } + + @Test + public void getEnabled() throws Exception { + role.getEnabled(); + } + + @Test + public void setEnabled() throws Exception { + role.setEnabled("test"); + } + +} \ No newline at end of file diff --git a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/RolesTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/RolesTest.java new file mode 100644 index 0000000..f429d1f --- /dev/null +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/RolesTest.java @@ -0,0 +1,34 @@ +/*- + * ============LICENSE_START======================================================= + * 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 com.woorea.openstack.keystone.v3.model; + +import org.junit.Test; + +public class RolesTest { + + Roles roles = new Roles(); + + @Test + public void getList() throws Exception { + roles.getList(); + } + + @Test(expected = NullPointerException.class) + public void iterator() throws Exception { + roles.iterator(); + } + +} \ No newline at end of file diff --git a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/ServiceTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/ServiceTest.java new file mode 100644 index 0000000..c659f03 --- /dev/null +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/ServiceTest.java @@ -0,0 +1,64 @@ +/*- + * ============LICENSE_START======================================================= + * 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 com.woorea.openstack.keystone.v3.model; + +import org.junit.Test; + +public class ServiceTest { + + Service service = new Service(); + + @Test + public void getId() throws Exception { + service.getId(); + } + + @Test + public void setId() throws Exception { + service.setId("test"); + } + + @Test + public void getType() throws Exception { + service.getType(); + } + + @Test + public void setType() throws Exception { + service.setType("test"); + } + + @Test + public void getName() throws Exception { + service.getName(); + } + + @Test + public void setName() throws Exception { + service.setName("test"); + } + + @Test + public void getDescription() throws Exception { + service.getDescription(); + } + + @Test + public void setDescription() throws Exception { + service.setDescription("test"); + } + +} \ No newline at end of file diff --git a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/ServicesTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/ServicesTest.java new file mode 100644 index 0000000..b8fdcbd --- /dev/null +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/ServicesTest.java @@ -0,0 +1,34 @@ +/*- + * ============LICENSE_START======================================================= + * 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 com.woorea.openstack.keystone.v3.model; + +import org.junit.Test; + +public class ServicesTest { + + Services services = new Services(); + + @Test + public void getList() throws Exception { + services.getList(); + } + + @Test(expected = NullPointerException.class) + public void iterator() throws Exception { + services.iterator(); + } + +} \ No newline at end of file diff --git a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/TokenTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/TokenTest.java new file mode 100644 index 0000000..49cd157 --- /dev/null +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/TokenTest.java @@ -0,0 +1,119 @@ +/*- + * ============LICENSE_START======================================================= + * 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 com.woorea.openstack.keystone.v3.model; + +import org.junit.Test; + +import java.util.Calendar; +import java.util.Collections; +import java.util.GregorianCalendar; + +public class TokenTest { + + Token token = new Token(); + + @Test + public void getId() throws Exception { + token.getId(); + } + + @Test + public void setId() throws Exception { + token.setId("test"); + } + + @Test + public void getExpiresAt() throws Exception { + token.getExpiresAt(); + } + + @Test + public void setExpiresAt() throws Exception { + Calendar calendar = new GregorianCalendar(); + token.setExpiresAt(calendar); + } + + @Test + public void getIssuedAt() throws Exception { + token.getIssuedAt(); + } + + @Test + public void setIssuedAt() throws Exception { + token.setIssuedAt(new GregorianCalendar()); + } + + @Test + public void getMethods() throws Exception { + token.getMethods(); + } + + @Test + public void setMethods() throws Exception { + token.setMethods(Collections.emptyList()); + } + + @Test + public void getDomain() throws Exception { + token.getDomain(); + } + + @Test + public void setDomain() throws Exception { + token.setDomain(new Token.Domain()); + } + + @Test + public void getProject() throws Exception { + token.getProject(); + } + + @Test + public void setProject() throws Exception { + token.setProject(new Token.Project()); + } + + @Test + public void getUser() throws Exception { + token.getUser(); + } + + @Test + public void setUser() throws Exception { + token.setUser(new Token.User()); + } + + @Test + public void getRoles() throws Exception { + token.getRoles(); + } + + @Test + public void setRoles() throws Exception { + token.setRoles(Collections.emptyList()); + } + + @Test + public void getCatalog() throws Exception { + token.getCatalog(); + } + + @Test + public void setCatalog() throws Exception { + token.setCatalog(Collections.emptyList()); + } + +} \ No newline at end of file diff --git a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/UserTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/UserTest.java new file mode 100644 index 0000000..d0887ac --- /dev/null +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/UserTest.java @@ -0,0 +1,104 @@ +/*- + * ============LICENSE_START======================================================= + * 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 com.woorea.openstack.keystone.v3.model; + +import org.junit.Test; + +public class UserTest { + + User user = new User(); + + @Test + public void getId() throws Exception { + user.getId(); + } + + @Test + public void setId() throws Exception { + user.setId("Test"); + } + + @Test + public void getDomainId() throws Exception { + user.getDomainId(); + } + + @Test + public void setDomainId() throws Exception { + user.setDomainId("test"); + } + + @Test + public void getDefaultProjectId() throws Exception { + user.getDefaultProjectId(); + } + + @Test + public void setDefaultProjectId() throws Exception { + user.setDefaultProjectId("tets"); + } + + @Test + public void getName() throws Exception { + user.getName(); + } + + @Test + public void setName() throws Exception { + user.setName("test"); + } + + @Test + public void getPassword() throws Exception { + user.getPassword(); + } + + @Test + public void setPassword() throws Exception { + user.setPassword("test"); + } + + @Test + public void getEmail() throws Exception { + user.getEmail(); + } + + @Test + public void setEmail() throws Exception { + user.setEmail("test"); + } + + @Test + public void getDescription() throws Exception { + user.getDescription(); + } + + @Test + public void setDescription() throws Exception { + user.setDescription("test"); + } + + @Test + public void getEnabled() throws Exception { + user.getEnabled(); + } + + @Test + public void setEnabled() throws Exception { + user.setEnabled(true); + } + +} \ No newline at end of file diff --git a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/UsersTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/UsersTest.java new file mode 100644 index 0000000..114a1b6 --- /dev/null +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/UsersTest.java @@ -0,0 +1,34 @@ +/*- + * ============LICENSE_START======================================================= + * 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 com.woorea.openstack.keystone.v3.model; + +import org.junit.Test; + +public class UsersTest { + + Users users = new Users(); + + @Test + public void getList() throws Exception { + users.getList(); + } + + @Test(expected = NullPointerException.class) + public void iterator() throws Exception { + users.iterator(); + } + +} \ No newline at end of file -- cgit 1.2.3-korg