@Test public void testChangeLogFailed() throws Exception { final ScmFileSet testFileSet = new ScmFileSet( new File( basedir, "project/dir" ) ); final Date dateFrom = getDate( 2009, 0, 01, 10, 00, 00, null ); final Date dateTo = getDate( 2009, 0, 12, 13, 00, 00, null ); List<Transaction> startTransaction = Collections.singletonList( new Transaction( 35L, new Date(), "sometran", "anyone" ) ); when( accurev.history( "myStream", "2009/01/01 10:00:00", null, 1, true, true ) ).thenReturn( startTransaction ); List<Transaction> endTransaction = Collections.singletonList( new Transaction( 42L, new Date(), "sometran", "anyone" ) ); when( accurev.history( "myStream", "2009/01/12 13:00:00", null, 1, true, true ) ).thenReturn( endTransaction ); when( accurev.history( eq( "myStream" ), any( String.class ), any( String.class ), eq( 0 ), eq( false ), eq( false ) ) ).thenReturn( null ); AccuRevChangeLogCommand command = new AccuRevChangeLogCommand( getLogger() ); CommandParameters commandParameters = new CommandParameters(); commandParameters.setString( CommandParameter.MESSAGE, "A commit message" ); commandParameters.setDate( CommandParameter.START_DATE, dateFrom ); commandParameters.setDate( CommandParameter.END_DATE, dateTo ); ChangeLogScmResult result = command.changelog( repo, testFileSet, commandParameters ); assertThat( result.isSuccess(), is( false ) ); assertThat( result.getProviderMessage(), notNullValue() ); }
public ChangeLogScmResult changelog( ScmProviderRepository repo, ScmFileSet testFileSet, CommandParameters params ) throws ScmException { return (ChangeLogScmResult) execute( repo, testFileSet, params ); }
AccuRevChangeLogCommand extends AbstractAccuRevCommand { public ChangeLogScmResult changelog( ScmProviderRepository repo, ScmFileSet testFileSet, CommandParameters params ) throws ScmException { return (ChangeLogScmResult) execute( repo, testFileSet, params ); } }
AccuRevChangeLogCommand extends AbstractAccuRevCommand { public ChangeLogScmResult changelog( ScmProviderRepository repo, ScmFileSet testFileSet, CommandParameters params ) throws ScmException { return (ChangeLogScmResult) execute( repo, testFileSet, params ); } AccuRevChangeLogCommand( ScmLogger logger ); }
AccuRevChangeLogCommand extends AbstractAccuRevCommand { public ChangeLogScmResult changelog( ScmProviderRepository repo, ScmFileSet testFileSet, CommandParameters params ) throws ScmException { return (ChangeLogScmResult) execute( repo, testFileSet, params ); } AccuRevChangeLogCommand( ScmLogger logger ); ChangeLogScmResult changelog( ScmProviderRepository repo, ScmFileSet testFileSet, CommandParameters params ); }
AccuRevChangeLogCommand extends AbstractAccuRevCommand { public ChangeLogScmResult changelog( ScmProviderRepository repo, ScmFileSet testFileSet, CommandParameters params ) throws ScmException { return (ChangeLogScmResult) execute( repo, testFileSet, params ); } AccuRevChangeLogCommand( ScmLogger logger ); ChangeLogScmResult changelog( ScmProviderRepository repo, ScmFileSet testFileSet, CommandParameters params );  }