package pwc.taxtech.atms.security;

import java.util.Hashtable;

import org.junit.Assert;
import org.junit.Test;

public class LdapAuthenticationProviderTest {

    // 暂时跳过该测试方法
    // @Test
    public void authenticateOk() {
        LdapAuthenticationProvider ldapAuthenticationProvider = new LdapAuthenticationProviderImpl();
        String username = "xxx";
        String password = "xxx";
        String ldapUrl = "LDAP://nam.ad.pwcinternal.com";
        String domain = "NAM";
        boolean result = ldapAuthenticationProvider.authenticate(username, password, ldapUrl, domain);
        System.out.println(result);
        // Assert.assertTrue(result);
    }

    @Test
    public void newClass() {
        LdapAuthenticationProviderImpl ldapAuthenticationProvider = new LdapAuthenticationProviderImpl();
        String username = "xxx";
        String password = "xxx";
        String ldapUrl = "LDAP://nam.ad.pwcinternal.com";
        String domain = "NAM";
        Hashtable<String, String> param = ldapAuthenticationProvider.buildParam(username, password, ldapUrl, domain);
        Assert.assertNotNull(param);
    }
}