1 package org.kuali.common.util.project.spring;
2
3 import org.junit.Assert;
4 import org.junit.Test;
5 import org.junit.runner.RunWith;
6 import org.kuali.common.util.project.KualiUtilProjectConstants;
7 import org.kuali.common.util.project.model.Project;
8 import org.kuali.common.util.project.model.ProjectIdentifier;
9 import org.slf4j.Logger;
10 import org.slf4j.LoggerFactory;
11 import org.springframework.beans.factory.annotation.Autowired;
12 import org.springframework.test.context.ContextConfiguration;
13 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
14
15 @RunWith(SpringJUnit4ClassRunner.class)
16 @ContextConfiguration(classes = KualiUtilProjectConfig.class)
17 public class AutowiredProjectConfigTest {
18
19 private static final Logger logger = LoggerFactory.getLogger(AutowiredProjectConfigTest.class);
20
21 protected static final ProjectIdentifier ID = KualiUtilProjectConstants.PROJECT_ID;
22
23 @Autowired
24 Project project;
25
26 @Test
27 public void test() {
28 logger.info("Constants: [" + ID.getGroupId() + ":" + ID.getArtifactId() + "]");
29 logger.info(" Loaded: [" + project.getGroupId() + ":" + project.getArtifactId() + "]");
30 Assert.assertEquals(ID.getGroupId(), project.getGroupId());
31 Assert.assertEquals(ID.getArtifactId(), project.getArtifactId());
32
33 }
34
35 }