Mercurial > hg > Members > tatsuki > bench > jungle-core
view src/test/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/impl/logging/LoggingNodeTest.java @ 42:a545fe750a78
added more tests
author | Shoshi TAMAKI |
---|---|
date | Thu, 31 Jan 2013 00:09:51 +0900 |
parents | |
children | 1c91c4357228 |
line wrap: on
line source
package jp.ac.u_ryukyu.ie.cr.shoshi.jungle.impl.logging; import org.junit.Assert; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.core.AttributesContainer; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.core.AttributesContainerTest; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.core.ParentTest; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.DefaultNode; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.logger.Logger; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.logger.LoggingNode; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.transaction.ClonableDefaultNode; import junit.framework.TestCase; import junit.framework.TestSuite; public class LoggingNodeTest extends TestCase { public void testGetLoggerIsNotNull() { LoggingNode<?> instance = instance(); Logger log = instance.getLogger(); Assert.assertNotNull(log); } public void testGetWrappedIsNotNull() { LoggingNode<?> instance = instance(); Object wrap = instance.getWrapper(); Assert.assertNotNull(wrap); } public static TestSuite suite() { TestSuite suite = new TestSuite(); suite.addTestSuite(ParentTestImpl.class); suite.addTestSuite(AttributesContainerTestImpl.class); suite.addTestSuite(LoggingNodeTest.class); return suite; } public static LoggingNode<?> instance() { return new LoggingNode<ClonableDefaultNode>(new ClonableDefaultNode(new DefaultNode())); } public static class ParentTestImpl extends ParentTest<LoggingNode<?>> { @Override public LoggingNode<?> instance() { return LoggingNodeTest.instance(); } } public static class AttributesContainerTestImpl extends AttributesContainerTest { @Override public AttributesContainer instance() { return LoggingNodeTest.instance(); } } }