Skip to main content
summaryrefslogtreecommitdiffstats
blob: 2caee3211361e607dd14e59f6c23c8a3aa08b5f7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*******************************************************************************
 * Copyright (c) 2011 Boeing.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Boeing - initial API and implementation
 *******************************************************************************/
package org.eclipse.osee.framework.skynet.core.artifact;

import java.util.Collection;
import java.util.logging.Level;
import junit.framework.Assert;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.utility.Artifacts;

/**
 * This test should be run as the last test of a suite to make sure that the ArtifactCache has no dirty artifacts.
 * 
 * @author Donald G. Dunne
 */
public class DirtyArtifactCacheTest {

   @org.junit.Test
   public void testArtifactCacheNotDirty() {
      final Collection<Artifact> dirtyArtifacts = ArtifactCache.getDirtyArtifacts();
      for (Artifact artifact : dirtyArtifacts) {
         OseeLog.logf(getClass(), Level.WARNING, "Name: %s Type: %s ", artifact.getName(),
            artifact.getArtifactTypeName());
      }
      Assert.assertTrue(String.format(
         "After all tests are run, there should be no dirty artifacts in Artifact Cache; \n Found [%s]",
         Artifacts.getNames(dirtyArtifacts)), dirtyArtifacts.isEmpty());
   }
}

Back to the top