001package org.apache.maven.wagon.providers.scm; 002 003/* 004 * Licensed to the Apache Software Foundation (ASF) under one 005 * or more contributor license agreements. See the NOTICE file 006 * distributed with this work for additional information 007 * regarding copyright ownership. The ASF licenses this file 008 * to you under the Apache License, Version 2.0 (the 009 * "License"); you may not use this file except in compliance 010 * with the License. You may obtain a copy of the License at 011 * 012 * http://www.apache.org/licenses/LICENSE-2.0 013 * 014 * Unless required by applicable law or agreed to in writing, 015 * software distributed under the License is distributed on an 016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 017 * KIND, either express or implied. See the License for the 018 * specific language governing permissions and limitations 019 * under the License. 020 */ 021 022import org.apache.maven.scm.provider.ScmProvider; 023import org.apache.maven.scm.provider.cvslib.cvsexe.CvsExeScmProvider; 024 025/** 026 * Test for ScmWagon using CVS Exe as underlying SCM 027 * 028 * @author <a href="carlos@apache.org">Carlos Sanchez</a> 029 * 030 */ 031public class ScmCvsExeWagonTest 032 extends AbstractScmCvsWagonTest 033{ 034 035 @Override 036 protected void setUp() 037 throws Exception 038 { 039 assumeHaveCvsBinary(); 040 if ( !testSkipped ) 041 { 042 super.setUp(); 043 } 044 } 045 046 protected ScmProvider getScmProvider() 047 { 048 return new CvsExeScmProvider(); 049 } 050 051 @Override 052 public void testWagonGetFileList() 053 throws Exception 054 { 055 // cvs rls is rare 056 } 057 058 @Override 059 public void testWagonResourceExists() 060 throws Exception 061 { 062 // cvs rls is rare 063 } 064 065 @Override 066 public void testWagonResourceNotExists() 067 throws Exception 068 { 069 // cvs rls is rare 070 } 071 072 @Override 073 protected boolean supportsGetIfNewer() 074 { 075 return false; 076 } 077 078 /** Optionally set the testSkipped flag */ 079 protected void assumeHaveCvsBinary() 080 { 081 if ( !isSystemCmd( CVS_COMMAND_LINE ) ) 082 { 083 testSkipped = true; 084 System.err.println( "'" + CVS_COMMAND_LINE + "' is not a system command. Ignored " + getName() + "." ); 085 } 086 } 087 088 /** 'cvs' command line */ 089 public static final String CVS_COMMAND_LINE = "cvs"; 090}