Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

RemoteListCommandTest.java 1008B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright (C) 2015, Kaloyan Raev <kaloyan.r@zend.com> and others
  3. *
  4. * This program and the accompanying materials are made available under the
  5. * terms of the Eclipse Distribution License v. 1.0 which is available at
  6. * https://www.eclipse.org/org/documents/edl-v10.php.
  7. *
  8. * SPDX-License-Identifier: BSD-3-Clause
  9. */
  10. package org.eclipse.jgit.api;
  11. import static org.junit.Assert.assertEquals;
  12. import java.util.List;
  13. import org.eclipse.jgit.transport.RemoteConfig;
  14. import org.junit.Test;
  15. public class RemoteListCommandTest extends AbstractRemoteCommandTest {
  16. @Test
  17. public void testList() throws Exception {
  18. // setup an initial remote
  19. RemoteConfig remoteConfig = setupRemote();
  20. // execute the command to list the remotes
  21. List<RemoteConfig> remotes = Git.wrap(db).remoteList().call();
  22. // assert that there is only one remote
  23. assertEquals(1, remotes.size());
  24. // assert that the available remote is the initial remote
  25. assertRemoteConfigEquals(remoteConfig, remotes.get(0));
  26. }
  27. }