ScmProvider provider = getScmManager().getProviderByUrl( getScmUrl() );
CommandParameters commandParameters = new CommandParameters();
commandParameters.setString( CommandParameter.FORCE_ADD, Boolean.TRUE.toString() );
AddScmResult result = provider.add( repository, new ScmFileSet( workingDirectory, file ), commandParameters );
assertTrue( "Check result was successful, output: " + result.getCommandOutput(), result.isSuccess() );
List<ScmFile> addedFiles = result.getAddedFiles();
if ( new File( workingDirectory, file.getPath() ).isFile() )
{
// Don't check directory add because some SCM tools ignore it
assertEquals( "Expected 1 file in the added files list " + addedFiles, 1, addedFiles.size() );