001package org.apache.maven.scm.provider.jazz.command.update; 002 003import org.apache.maven.scm.provider.jazz.JazzScmTestCase; 004import org.apache.maven.scm.provider.jazz.repository.JazzScmProviderRepository; 005import org.codehaus.plexus.util.cli.Commandline; 006 007/* 008 * Licensed to the Apache Software Foundation (ASF) under one 009 * or more contributor license agreements. See the NOTICE file 010 * distributed with this work for additional information 011 * regarding copyright ownership. The ASF licenses this file 012 * to you under the Apache License, Version 2.0 (the 013 * "License"); you may not use this file except in compliance 014 * with the License. You may obtain a copy of the License at 015 * 016 * http://www.apache.org/licenses/LICENSE-2.0 017 * 018 * Unless required by applicable law or agreed to in writing, 019 * software distributed under the License is distributed on an 020 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 021 * KIND, either express or implied. See the License for the 022 * specific language governing permissions and limitations 023 * under the License. 024 */ 025 026/** 027 * @author <a href="mailto:ChrisGWarp@gmail.com">Chris Graham</a> 028 */ 029public class JazzUpdateCommandTest 030 extends JazzScmTestCase 031{ 032 private JazzScmProviderRepository repo; 033 034 protected void setUp() 035 throws Exception 036 { 037 super.setUp(); 038 repo = getScmProviderRepository(); 039 } 040 041 public void testCreateAcceptCommand() 042 throws Exception 043 { 044 Commandline cmd = new JazzUpdateCommand().createAcceptCommand( repo, getScmFileSet() ).getCommandline(); 045 String expected = 046 "scm accept --repository-uri https://localhost:9443/jazz --username myUserName --password myPassword --flow-components"; 047 assertCommandLine( expected, getWorkingDirectory(), cmd ); 048 } 049}