Package guiceberry2_junit3.tutorial_1_server

Source Code of guiceberry2_junit3.tutorial_1_server.Example4CanonicalSameJvmControllableInjectionTest

package guiceberry2_junit3.tutorial_1_server;

import com.google.inject.Inject;
import com.google.inject.testing.guiceberry.GuiceBerryEnv;
import com.google.inject.testing.guiceberry.controllable.IcClient;
import com.google.inject.testing.guiceberry.junit3.GuiceBerryJunit3TestCase;

import guiceberry2_junit3.tutorial_1_server.prod.PetOfTheMonth;


@GuiceBerryEnv(Tutorial1Envs.PET_STORE_ENV_4_CANONICAL_SAME_JVM_CONTROLLABLE_POTM)
public class Example4CanonicalSameJvmControllableInjectionTest extends GuiceBerryJunit3TestCase {

  @Inject
  WelcomeTestPage welcomeTestPage;
 
  @Inject
  private IcClient<PetOfTheMonth> petOfTheMonthIc;

  public void testDogAsPotm() {
    PetOfTheMonth expected = PetOfTheMonth.DOG;
    petOfTheMonthIc.setOverride(expected);
    welcomeTestPage.goTo();
    welcomeTestPage.assertPetOfTheMonth(expected);
  }

  public void testCatAsPotm() {
    PetOfTheMonth expected = PetOfTheMonth.CAT;
    petOfTheMonthIc.setOverride(expected);
    welcomeTestPage.goTo();
    welcomeTestPage.assertPetOfTheMonth(expected);
  }
}
TOP

Related Classes of guiceberry2_junit3.tutorial_1_server.Example4CanonicalSameJvmControllableInjectionTest

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.