use of org.olat.login.oauth.spi.LinkedInProvider in project OpenOLAT by OpenOLAT.
the class OAuthDispatcherTest method parseEmail_linkedIn.
@Test
public void parseEmail_linkedIn() {
StringBuilder sb = new StringBuilder();
sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>").append("<person>").append("<first-name>John</first-name>").append("<last-name>Smith</last-name>").append("<email-address>j.smith@openolat.com</email-address>").append("</person>");
OAuthUser infos = new LinkedInProvider().parseInfos(sb.toString());
Assert.assertNotNull(infos);
Assert.assertEquals("John", infos.getFirstName());
Assert.assertEquals("Smith", infos.getLastName());
Assert.assertEquals("j.smith@openolat.com", infos.getEmail());
}
use of org.olat.login.oauth.spi.LinkedInProvider in project openolat by klemens.
the class OAuthDispatcherTest method parseEmail_linkedIn.
@Test
public void parseEmail_linkedIn() {
StringBuilder sb = new StringBuilder();
sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>").append("<person>").append("<first-name>John</first-name>").append("<last-name>Smith</last-name>").append("<email-address>j.smith@openolat.com</email-address>").append("</person>");
OAuthUser infos = new LinkedInProvider().parseInfos(sb.toString());
Assert.assertNotNull(infos);
Assert.assertEquals("John", infos.getFirstName());
Assert.assertEquals("Smith", infos.getLastName());
Assert.assertEquals("j.smith@openolat.com", infos.getEmail());
}
Aggregations