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 {
}
public GitlabAccessLevel getLdapAccess() {
if(ldapAccess == null) {
if (ldapAccess == null) {
return null;
}
return GitlabAccessLevel.fromAccessValue(ldapAccess);
......
......@@ -2,6 +2,8 @@ package org.gitlab.api.models;
import org.junit.Test;
import static org.junit.Assert.assertNull;
/**
* Tests for {@link GitlabGroup}
*/
......@@ -17,6 +19,6 @@ public class GitlabGroupTest {
public void getLdapAccessHandlesNull() {
GitlabGroup group = new GitlabGroup();
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