001package org.apache.maven.scm.provider.jazz.command.checkin;
002
003import org.apache.maven.scm.provider.jazz.command.JazzTckUtil;
004import org.apache.maven.scm.tck.command.checkin.CheckInCommandTckTest;
005
006import java.io.File;
007
008/*
009 * Licensed to the Apache Software Foundation (ASF) under one
010 * or more contributor license agreements.  See the NOTICE file
011 * distributed with this work for additional information
012 * regarding copyright ownership.  The ASF licenses this file
013 * to you under the Apache License, Version 2.0 (the
014 * "License"); you may not use this file except in compliance
015 * with the License.  You may obtain a copy of the License at
016 *
017 * http://www.apache.org/licenses/LICENSE-2.0
018 *
019 * Unless required by applicable law or agreed to in writing,
020 * software distributed under the License is distributed on an
021 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
022 * KIND, either express or implied.  See the License for the
023 * specific language governing permissions and limitations
024 * under the License.
025 */
026
027/**
028 * @author <a href="mailto:ChrisGWarp@gmail.com">Chris Graham</a>
029 */
030public class JazzCheckInCommandTckTest
031    extends CheckInCommandTckTest
032{
033    // Easy access to our Tck Test Helper class.
034    private JazzTckUtil jazzTckUtil = new JazzTckUtil();
035
036    /**
037     * {@inheritDoc}
038     *
039     * @see org.apache.maven.scm.ScmTckTestCase#initRepo()
040     */
041    @Override
042    public void initRepo()
043        throws Exception
044    {
045        // Needed when there is more than one test case (in the parent).
046        // Needed for a new system time for uniqueness.
047        jazzTckUtil.generateNewSystemTime();
048        // Create a unique repository workspace for this test.
049        jazzTckUtil.initRepo( getScmRepository() );
050    }
051
052    /**
053     * {@inheritDoc}
054     *
055     * @see org.apache.maven.scm.ScmTckTestCase#removeRepo()
056     */
057    @Override
058    public void removeRepo()
059        throws Exception
060    {
061        super.removeRepo();
062        jazzTckUtil.removeRepo();
063    }
064
065    /**
066     * {@inheritDoc}
067     *
068     * @see org.apache.maven.scm.ScmTckTestCase#getScmUrl()
069     */
070    @Override
071    public String getScmUrl()
072        throws Exception
073    {
074        return jazzTckUtil.getScmUrl();
075    }
076
077    /**
078     * {@inheritDoc}
079     *
080     * @see org.apache.maven.scm.ScmTestCase#getWorkingCopy()
081     */
082    @Override
083    protected File getWorkingCopy()
084    {
085        return jazzTckUtil.getWorkingCopy();
086    }
087
088    /**
089     * {@inheritDoc}
090     *
091     * @see org.apache.maven.scm.ScmTestCase#getAssertionCopy()
092     */
093    @Override
094    protected File getAssertionCopy()
095    {
096        return jazzTckUtil.getAssertionCopy();
097    }
098}