Package com.tll.mail

Source Code of com.tll.mail.MailModuleTest

/**
* The Logic Lab
* @author jpk
* Apr 20, 2009
*/
package com.tll.mail;

import org.testng.annotations.Test;

import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Stage;
import com.tll.config.Config;

/**
* MailModuleTest - Verifies the dependency injection of the {@link MailModule}.
* @author jpk
*/
@Test(groups = "mail")
public class MailModuleTest {

  /**
   * Tests the di of the mail module.
   * @throws Exception
   */
  public void test() throws Exception {
    Config c = Config.load();
    Injector i;
    try {
      i = Guice.createInjector(Stage.DEVELOPMENT, new MailModule(c));
    }
    catch(Throwable t) {
      throw new Exception(t.getMessage());
    }
    MailManager m = i.getInstance(MailManager.class);
    assert m != null;
  }
}
TOP

Related Classes of com.tll.mail.MailModuleTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.