/** * Test method for {@link * io.vertx.ext.mail.impl.sasl.AuthOperationFactory#createAuth(java.lang.String, java.lang.String, * java.util.Set)} make sure that the default auth method works and is PLAIN * * @throws Exception */ @Test public final void testCreateAuth() throws Exception { Set<String> allowedAuth = new HashSet<String>(); allowedAuth.add("PLAIN"); assertEquals( AuthPlain.class, AuthOperationFactory.createAuth("user", "pw", allowedAuth).getClass()); }
@Test public final void testAuthNotFound() throws Exception { Set<String> allowedAuth = new HashSet<String>(); allowedAuth.add("ASDF"); assertNull(AuthOperationFactory.createAuth("user", "pw", allowedAuth)); }