View Javadoc
1   /*
2    *    Copyright 2011-2024 the original author or authors.
3    *
4    *    This program is free software; you can redistribute it and/or
5    *    modify it under the terms of the GNU General Public License
6    *    as published by the Free Software Foundation; either version 2
7    *    of the License, or (at your option) any later version.
8    *
9    *    You may obtain a copy of the License at
10   *
11   *       https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html
12   *
13   *    This program is distributed in the hope that it will be useful,
14   *    but WITHOUT ANY WARRANTY; without even the implied warranty of
15   *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16   *    GNU General Public License for more details.
17   */
18  package com.hazendaz.maven.makeself;
19  
20  import org.apache.maven.plugin.MojoFailureException;
21  import org.apache.maven.plugin.logging.SystemStreamLog;
22  import org.junit.jupiter.api.Assertions;
23  import org.junit.jupiter.api.Test;
24  
25  /**
26   * The Class PortableGitTest.
27   */
28  public class PortableGitTest {
29  
30      /**
31       * Process git test.
32       *
33       * @throws MojoFailureException
34       *             the mojo failure exception
35       */
36      @Test
37      void processGitTest() throws MojoFailureException {
38          final PortableGit portableGit = new PortableGit(new SystemStreamLog());
39          Assertions.assertEquals("git-for-windows", portableGit.getArtifactId());
40          Assertions.assertEquals("portable", portableGit.getClassifier());
41          Assertions.assertEquals("com.github.hazendaz.git", portableGit.getGroupId());
42          Assertions.assertEquals("PortableGit", portableGit.getName());
43          Assertions.assertEquals("tar.gz", portableGit.getExtension());
44          Assertions.assertNotEquals("${git.version}", portableGit.getVersion());
45      }
46  
47  }