@Before public void setUp() throws Exception { expect(requiredConfig.getString(ContainerConfig.DEFAULT_CONTAINER, LOCKED_DOMAIN_SUFFIX_KEY)).andReturn("-a.example.com:8080").anyTimes(); expect(requiredConfig.getBool(ContainerConfig.DEFAULT_CONTAINER, LOCKED_DOMAIN_REQUIRED_KEY)).andReturn(true).anyTimes(); expect(requiredConfig.getContainers()) .andReturn(Arrays.asList(ContainerConfig.DEFAULT_CONTAINER)).anyTimes(); expect(enabledConfig.getString(ContainerConfig.DEFAULT_CONTAINER, LOCKED_DOMAIN_SUFFIX_KEY)).andReturn("-a.example.com:8080").anyTimes(); expect(enabledConfig.getContainers()) .andReturn(Arrays.asList(ContainerConfig.DEFAULT_CONTAINER)).anyTimes(); wantsLocked = makeGadget(true, false, "http://somehost.com/somegadget.xml"); notLocked = makeGadget(false, false, "not-locked"); wantsSecurityToken = makeGadget(false, true, "http://somehost.com/securitytoken.xml"); wantsBoth = makeGadget(true, true, "http://somehost.com/tokenandlocked.xml"); }
@Before public void setUp() throws Exception { requiredConfig = new BasicContainerConfig(); requiredConfig.newTransaction().addContainer( makeContainer(ContainerConfig.DEFAULT_CONTAINER, LOCKED_DOMAIN_SUFFIX_KEY, "-a.example.com:8080", LOCKED_DOMAIN_REQUIRED_KEY, true)).commit(); enabledConfig = new BasicContainerConfig(); enabledConfig.newTransaction().addContainer( makeContainer(ContainerConfig.DEFAULT_CONTAINER, LOCKED_DOMAIN_SUFFIX_KEY, "-a.example.com:8080")).commit(); wantsLocked = makeGadget(true, false, "http://somehost.com/somegadget.xml"); notLocked = makeGadget(false, false, "not-locked"); wantsSecurityToken = makeGadget(false, true, "http://somehost.com/securitytoken.xml"); wantsBoth = makeGadget(true, true, "http://somehost.com/tokenandlocked.xml"); }
@Before public void setUp() throws Exception { requiredConfig = new BasicContainerConfig(); requiredConfig.newTransaction().addContainer( makeContainer(ContainerConfig.DEFAULT_CONTAINER, LOCKED_DOMAIN_SUFFIX_KEY, "-a.example.com:8080", LOCKED_DOMAIN_REQUIRED_KEY, true)).commit(); enabledConfig = new BasicContainerConfig(); enabledConfig.newTransaction().addContainer( makeContainer(ContainerConfig.DEFAULT_CONTAINER, LOCKED_DOMAIN_SUFFIX_KEY, "-a.example.com:8080")).commit(); wantsLocked = makeGadget(true, false, "http://somehost.com/somegadget.xml"); notLocked = makeGadget(false, false, "not-locked"); wantsSecurityToken = makeGadget(false, true, "http://somehost.com/securitytoken.xml"); wantsBoth = makeGadget(true, true, "http://somehost.com/tokenandlocked.xml"); }