Import code coverage for libs.
Change-Id: I757d6d8e29fc22fc6a2b11159eed546dd702a5cd
Issue-ID: SO-369
Signed-off-by: subhash kumar singh <subhash.kumar.singh@huawei.com>
--- /dev/null
+/*-
+ * ============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.api;
+
+import org.junit.Test;
+
+public class GroupsResourceTest {
+
+ GroupsResource groupsResource = new GroupsResource(null);
+
+ @Test
+ public void userRolesTest() throws Exception {
+ groupsResource.userRoles("test", "test");
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/*-
+ * ============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.api;
+
+import com.woorea.openstack.keystone.model.Role;
+import org.junit.Test;
+
+public class ProjectGroupRolesResourceTest {
+
+ ProjectGroupRolesResource projectGroupRolesResource = new ProjectGroupRolesResource(null, "test");
+
+ @Test(expected = UnsupportedOperationException.class)
+ public void createTest() throws Exception {
+ projectGroupRolesResource.create(new Role());
+ }
+
+ @Test(expected = UnsupportedOperationException.class)
+ public void showTest() throws Exception {
+ projectGroupRolesResource.show("test");
+ }
+
+ @Test(expected = UnsupportedOperationException.class)
+ public void updateTest() throws Exception {
+ projectGroupRolesResource.update("test", new Role());
+ }
+
+ @Test(expected = UnsupportedOperationException.class)
+ public void deleteTest() throws Exception {
+ projectGroupRolesResource.delete("test");
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/*-
+ * ============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.api;
+
+import org.junit.Test;
+
+public class ProjectRolesResourceTest {
+
+ ProjectRolesResource projectRolesResource = new ProjectRolesResource(null, "path");
+
+ @Test
+ public void addTest() throws Exception {
+ projectRolesResource.add("test");
+ }
+
+ @Test
+ public void removeTest() throws Exception {
+ projectRolesResource.remove("test");
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/*-
+ * ============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.api;
+
+import org.junit.Test;
+
+public class ProjectUserRolesResourceTest {
+
+ ProjectUserRolesResource projectUserRolesResource = new ProjectUserRolesResource(null, "test");
+
+ @Test
+ public void addTest() throws Exception {
+ projectUserRolesResource.add("roleid");
+ }
+
+ @Test
+ public void removeTest() throws Exception {
+ projectUserRolesResource.remove("roleid");
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/*-
+ * ============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.api;
+
+import org.junit.Test;
+
+public class ProjectsResourceTest {
+
+ ProjectsResource projectsResource = new ProjectsResource(null);
+
+ @Test(expected = NullPointerException.class)
+ public void usersTest() throws Exception {
+ projectsResource.users("projectid");
+ }
+
+ @Test
+ public void userRolesTest() throws Exception {
+ projectsResource.userRoles("pid", "uid");
+ }
+
+ @Test
+ public void groupRolesTest() throws Exception {
+ projectsResource.groupRoles("pid", "gid");
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/*-
+ * ============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.api;
+
+import org.junit.Test;
+
+public class RolesResourceTest {
+
+ RolesResource rolesResource = new RolesResource(null);
+
+ @Test(expected = NullPointerException.class)
+ public void usersTest() throws Exception {
+ rolesResource.users("domainid", "userid");
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/*-
+ * ============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.api;
+
+import com.woorea.openstack.keystone.v3.model.Authentication;
+import org.junit.Test;
+
+public class TokensResourceTest {
+
+ TokensResource tokensResource = new TokensResource(null);
+
+ @Test
+ public void authenticateTest() throws Exception {
+ tokensResource.authenticate(new Authentication());
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void showTest() throws Exception {
+ tokensResource.show();
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/*-
+ * ============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.api;
+
+import org.junit.Test;
+
+public class UsersResourceTest {
+
+ UsersResource usersResource = new UsersResource(null);
+
+ @Test(expected = NullPointerException.class)
+ public void groupsTest() throws Exception {
+ usersResource.groups("id");
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void projectsTest() throws Exception {
+ usersResource.projects("uid");
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void rolesTest() throws Exception {
+ usersResource.roles("uid");
+ }
+
+}
\ No newline at end of file