Commit a29f0df7 authored by Iain Adams's avatar Iain Adams

#154 Formatted code and added an explicit assertion (instead of failing by NPE).

parent c71699d6
...@@ -49,7 +49,7 @@ public class GitlabGroup { ...@@ -49,7 +49,7 @@ public class GitlabGroup {
} }
public GitlabAccessLevel getLdapAccess() { public GitlabAccessLevel getLdapAccess() {
if(ldapAccess == null) { if (ldapAccess == null) {
return null; return null;
} }
return GitlabAccessLevel.fromAccessValue(ldapAccess); return GitlabAccessLevel.fromAccessValue(ldapAccess);
......
...@@ -2,6 +2,8 @@ package org.gitlab.api.models; ...@@ -2,6 +2,8 @@ package org.gitlab.api.models;
import org.junit.Test; import org.junit.Test;
import static org.junit.Assert.assertNull;
/** /**
* Tests for {@link GitlabGroup} * Tests for {@link GitlabGroup}
*/ */
...@@ -17,6 +19,6 @@ public class GitlabGroupTest { ...@@ -17,6 +19,6 @@ public class GitlabGroupTest {
public void getLdapAccessHandlesNull() { public void getLdapAccessHandlesNull() {
GitlabGroup group = new GitlabGroup(); GitlabGroup group = new GitlabGroup();
group.setLdapAccess(null); group.setLdapAccess(null);
group.getLdapAccess(); assertNull( group.getLdapAccess() );
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment