Skip to content

Commit 78c691b

Browse files
Test fix - override 'getIM' in MockLdapEntry to avoid NPEs (#76)
1 parent e4d778c commit 78c691b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

OpenLdapSync/src/org/labkey/openldapsync/ldap/LdapSyncRunner.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
import static org.labkey.openldapsync.ldap.LdapSettings.DEFAULT_UID_VAL;
6060
import static org.labkey.openldapsync.ldap.LdapSettings.DISPLAYNAME_FIELD_PROP;
6161
import static org.labkey.openldapsync.ldap.LdapSettings.FIRSTNAME_FIELD_PROP;
62+
import static org.labkey.openldapsync.ldap.LdapSettings.DEFAULT_IM_VAL;
6263

6364
/**
6465
* Created with IntelliJ IDEA.
@@ -876,6 +877,7 @@ private MockLdapEntry getUserEntry(String email, LdapSettings settings) throws E
876877
props.put(DEFAULT_PHONE_VAL, "(123) 456-7890");
877878
props.put(DEFAULT_FIRST_NAME_VAL, "Test");
878879
props.put(DEFAULT_LAST_NAME_VAL, "User");
880+
props.put(DEFAULT_IM_VAL, "IMTest");
879881

880882
String dn = "uid=" + ve.getPersonal() + ",cn=users,dc=example,dc=com";
881883

@@ -1155,6 +1157,12 @@ protected String getAttribute(String alias)
11551157
return _otherProps.get(alias);
11561158
}
11571159

1160+
@Override
1161+
public String getIM()
1162+
{
1163+
return _otherProps.get(DEFAULT_IM_VAL);
1164+
}
1165+
11581166
@Override
11591167
public boolean isEnabled()
11601168
{

0 commit comments

Comments
 (0)