PageRenderTime 5311ms CodeModel.GetById 40ms RepoModel.GetById 8ms app.codeStats 0ms

/maven-shared-components-15/maven-dependency-analyzer/src/test/java/org/apache/maven/shared/dependency/analyzer/ProjectDependencyAnalysisTest.java

#
Java | 51 lines | 18 code | 7 blank | 26 comment | 0 complexity | b1c30ff45c185714d0184f157838ccc9 MD5 | raw file
Possible License(s): Apache-2.0
  1. package org.apache.maven.shared.dependency.analyzer;
  2. /*
  3. * Licensed to the Apache Software Foundation (ASF) under one
  4. * or more contributor license agreements. See the NOTICE file
  5. * distributed with this work for additional information
  6. * regarding copyright ownership. The ASF licenses this file
  7. * to you under the Apache License, Version 2.0 (the
  8. * "License"); you may not use this file except in compliance
  9. * with the License. You may obtain a copy of the License at
  10. *
  11. * http://www.apache.org/licenses/LICENSE-2.0
  12. *
  13. * Unless required by applicable law or agreed to in writing,
  14. * software distributed under the License is distributed on an
  15. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  16. * KIND, either express or implied. See the License for the
  17. * specific language governing permissions and limitations
  18. * under the License.
  19. */
  20. import java.util.HashSet;
  21. import java.util.Set;
  22. import junit.framework.TestCase;
  23. /**
  24. * Tests <code>ProjectDependencyAnalysis</code>.
  25. *
  26. * @author <a href="mailto:markhobson@gmail.com">Mark Hobson</a>
  27. * @version $Id: ProjectDependencyAnalysisTest.java 661727 2008-05-30 14:21:49Z bentmann $
  28. * @see ProjectDependencyAnalysis
  29. */
  30. public class ProjectDependencyAnalysisTest extends TestCase
  31. {
  32. // tests ------------------------------------------------------------------
  33. public void testConstructor()
  34. {
  35. Set usedDeclaredArtifacts = new HashSet();
  36. Set usedUndeclaredArtifacts = new HashSet();
  37. Set unusedDeclaredArtifacts = new HashSet();
  38. ProjectDependencyAnalysis analysis =
  39. new ProjectDependencyAnalysis( usedDeclaredArtifacts, usedUndeclaredArtifacts, unusedDeclaredArtifacts );
  40. assertEquals( usedDeclaredArtifacts, analysis.getUsedDeclaredArtifacts() );
  41. assertEquals( usedUndeclaredArtifacts, analysis.getUsedUndeclaredArtifacts() );
  42. assertEquals( unusedDeclaredArtifacts, analysis.getUnusedDeclaredArtifacts() );
  43. }
  44. }