Skip to content

Commit

Permalink
[JENKINS-14436] Updating test
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfgarnet committed Jul 15, 2012
1 parent 3125983 commit fc10ad8
Showing 1 changed file with 21 additions and 1 deletion.
@@ -1,22 +1,32 @@
package net.praqma.hudson.test.integration.userstories;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;

import hudson.model.AbstractBuild;
import hudson.model.Result;
import hudson.model.User;
import hudson.scm.ChangeLogSet;
import hudson.scm.ChangeLogSet.AffectedFile;
import hudson.scm.ChangeLogSet.Entry;
import net.praqma.clearcase.ucm.entities.Baseline;
import net.praqma.clearcase.ucm.entities.Project.PromotionLevel;
import net.praqma.hudson.scm.ChangeLogEntryImpl;
import net.praqma.hudson.test.CCUCMRule;
import net.praqma.hudson.test.SystemValidator;
import net.praqma.junit.DescriptionRule;
import net.praqma.junit.TestDescription;

import net.praqma.clearcase.test.junit.ClearCaseRule;

import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;

public class JENKINS14436 {

@ClassRule
Expand Down Expand Up @@ -44,7 +54,17 @@ public void jenkins14436() throws Exception {
Baseline baseline2 = ccenv.context.baselines.get( "model-2" );
new SystemValidator( build ).validateBuild( Result.SUCCESS ).validateBuiltBaseline( PromotionLevel.BUILT, baseline2, false ).validate();

ChangeLogSet<? extends Entry> chlog = build.getChangeSet();
ChangeLogSet<? extends Entry> ls = build.getChangeSet();

Object[] items = ls.getItems();

System.out.println( "ITEMS: " + items );

assertThat( items.length, is( 1 ) );

Collection<String> col = ((ChangeLogEntryImpl)items[0]).getAffectedPaths();
assertThat( col.size(), is( 1 ) );

}


Expand Down

0 comments on commit fc10ad8

Please sign in to comment.