aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java/org/anarres/cpp/BuildMetadataTest.java
blob: 42dc0710db62c0d68565679875cf7205118573e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package org.anarres.cpp;

import com.google.common.base.Charsets;
import com.google.common.io.Resources;
import java.net.URL;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 *
 * @author shevek
 */
public class BuildMetadataTest {

    private static final Logger LOG = LoggerFactory.getLogger(BuildMetadataTest.class);

    @Test
    public void testProperties() throws Exception {
        URL url = Resources.getResource("META-INF/jcpp.properties");
        String text = Resources.asCharSource(url, Charsets.ISO_8859_1).read();
        LOG.info("Metadata is " + text);
    }

    @Test
    public void testMetadata() throws Exception {
        BuildMetadata metadata = BuildMetadata.getInstance();
        LOG.info("Version is " + metadata.getVersion());
        LOG.info("BuildDate is " + metadata.getBuildDate());
        LOG.info("ChangeId is " + metadata.getChangeId());
    }

}