Methods Summary |
---|
protected void | setUp()
instance = new ProvidedServiceConfig();
instance.setExtensionProfileClass(ExtensionProfile.class);
instance.setFeedType(Feed.class);
instance.setEntryType(Entry.class);
|
protected void | tearDown()
super.tearDown();
instance.destroy();
|
public void | testGetExtensionProfile()
try{
this.instance.setExtensionProfile(null);
fail("value must not be null");
}catch (IllegalArgumentException e) {
}
ExtensionProfile profile = this.instance.getExtensionProfile();
assertNotNull(profile);
assertSame(profile,this.instance.getExtensionProfile());
this.instance.visiteInitialize();
assertSame(profile,this.instance.getExtensionProfile());
assertNull(new ProvidedServiceConfig().getExtensionProfile());
|
public void | testSetPoolSize()
assertEquals(5,instance.getPoolSize());
instance.destroy();
instance = new ProvidedServiceConfig();
instance.setExtensionProfileClass(ExtensionProfile.class);
instance.setFeedType(Feed.class);
instance.setEntryType(Entry.class);
instance.setPoolSize(30);
instance.visiteInitialize();
assertEquals(30,instance.getPoolSize());
instance.destroy();
instance = new ProvidedServiceConfig();
instance.setExtensionProfileClass(ExtensionProfile.class);
instance.setFeedType(Feed.class);
instance.setEntryType(Entry.class);
instance.setPoolSize(-5);
instance.visiteInitialize();
assertEquals(5,instance.getPoolSize());
|
public void | testVisiteDestroy()
ExtensionProfile profile = this.instance.getExtensionProfile();
assertNotNull(profile);
assertNotNull(instance.extProfThreadLocal.get());
instance.visiteDestroy();
assertNull(instance.extProfThreadLocal.get());
instance.visiteDestroy();
assertNull(instance.extProfThreadLocal.get());
|
public void | testVisiteInitialize()
instance.visiteInitialize();
assertNull(instance.extProfThreadLocal.get());
instance.getExtensionProfile();
assertNotNull(instance.extProfThreadLocal.get());
|