[Clirr-devel] CVS: clirr/src/test/net/sf/clirr/checks ClassHierarchyCheckTest.java,NONE,1.1
Status: Alpha
Brought to you by:
lkuehne
From: Lars K?h. <lk...@us...> - 2004-05-23 14:27:55
|
Update of /cvsroot/clirr/clirr/src/test/net/sf/clirr/checks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29623/src/test/net/sf/clirr/checks Added Files: ClassHierarchyCheckTest.java Log Message: Warn about introducing new superclasses for Exceptions. Also added unit tests for class hierarchy check. --- NEW FILE --- package net.sf.clirr.checks; import net.sf.clirr.framework.ClassChangeCheck; import net.sf.clirr.event.ApiDifference; import net.sf.clirr.event.Severity; /** * @author lkuehne */ public class ClassHierarchyCheckTest extends AbstractCheckTestCase { public void testHierarchyChangesAreReported() { ApiDifference[] expected = new ApiDifference[] { new ApiDifference("Added java.lang.RuntimeException to the list of superclasses of testlib.ApplicationException", Severity.WARNING, "testlib.ApplicationException", null, null), new ApiDifference("Removed java.awt.event.MouseAdapter from the list of superclasses of testlib.ChangingHierarchy", Severity.ERROR, "testlib.ChangingHierarchy", null, null), new ApiDifference("Added java.awt.event.WindowAdapter to the list of superclasses of testlib.ChangingHierarchy", Severity.INFO, "testlib.ChangingHierarchy", null, null), }; verify(expected); } protected ClassChangeCheck createCheck(TestDiffListener tdl) { return new ClassHierarchyCheck(tdl); } } |