]> source.dussan.org Git - archiva.git/commitdiff
simplify test
authorBrett Porter <brett@apache.org>
Thu, 20 Aug 2009 19:45:05 +0000 (19:45 +0000)
committerBrett Porter <brett@apache.org>
Thu, 20 Aug 2009 19:45:05 +0000 (19:45 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@806324 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/resolvers/ManagedRepositoryProjectResolverTest.java

index db40272ca8d30591e8d8c08dc1231b2345f547f0..d9a315600f02645ed4d770b6e529ba70c953d5ea 100644 (file)
@@ -71,16 +71,9 @@ public class ManagedRepositoryProjectResolverTest
             assertEquals( "1.0-SNAPSHOT", model.getVersion() );
             assertEquals( "Unique Version Snapshot - Build 3", model.getName() );            
         } 
-        catch ( Exception e )
+        catch ( ProjectModelException e )
         {
-            if( e instanceof ProjectModelException )
-            {
-                fail( "A ProjectModelException should not have occurred. Instead, the latest timestamp should have been found!" );
-            }
-            else
-            {
-                throw e;
-            }
+            fail( "A ProjectModelException should not have occurred. Instead, the latest timestamp should have been found!" );
         }
     }
     
@@ -129,9 +122,9 @@ public class ManagedRepositoryProjectResolverTest
             resolver.resolveProjectModel( ref );
             fail( "A ProjectModelException should have been thrown." );
         }
-        catch( Exception e )
+        catch( ProjectModelException e )
         {
-            assertTrue( e instanceof ProjectModelException );
+            assertTrue( true );
         }
     }