1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package com.github.maven_nar.test;
21
22 import junit.framework.Assert;
23 import junit.framework.TestCase;
24
25 import com.github.maven_nar.Linker;
26 import com.github.maven_nar.NarProperties;
27 import com.github.maven_nar.NarUtil;
28
29
30
31
32
33 public class TestLinkerVersion extends TestCase {
34 private Linker linker;
35
36
37
38
39
40
41 @Override
42 protected void setUp() throws Exception {
43 super.setUp();
44 final String architecture = System.getProperty("os.arch");
45 this.linker = new Linker();
46
47 this.linker.getName(NarProperties.getInstance(null),
48 NarUtil.getArchitecture(architecture) + "." + NarUtil.getOS(null) + ".");
49 }
50
51 public void testVersion() throws Exception {
52 if ("Windows".equals(NarUtil.getOS(null)) && null == System.getenv("DevEnvDir")) {
53
54 return;
55 }
56 final String version = this.linker.getVersion();
57 Assert.assertNotNull(version);
58 }
59
60 }