001package org.kuali.common.util.project.spring; 002 003import org.junit.Assert; 004import org.junit.Test; 005import org.junit.runner.RunWith; 006import org.kuali.common.util.project.KualiUtilProjectConstants; 007import org.kuali.common.util.project.model.Project; 008import org.kuali.common.util.project.model.ProjectIdentifier; 009import org.slf4j.Logger; 010import org.slf4j.LoggerFactory; 011import org.springframework.beans.factory.annotation.Autowired; 012import org.springframework.test.context.ContextConfiguration; 013import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; 014 015@RunWith(SpringJUnit4ClassRunner.class) 016@ContextConfiguration(classes = KualiUtilProjectConfig.class) 017public class AutowiredProjectConfigTest { 018 019 private static final Logger logger = LoggerFactory.getLogger(AutowiredProjectConfigTest.class); 020 021 protected static final ProjectIdentifier ID = KualiUtilProjectConstants.PROJECT_ID; 022 023 @Autowired 024 Project project; 025 026 @Test 027 public void test() { 028 logger.info("Constants: [" + ID.getGroupId() + ":" + ID.getArtifactId() + "]"); 029 logger.info(" Loaded: [" + project.getGroupId() + ":" + project.getArtifactId() + "]"); 030 Assert.assertEquals(ID.getGroupId(), project.getGroupId()); 031 Assert.assertEquals(ID.getArtifactId(), project.getArtifactId()); 032 // PropertyUtils.info(project.getProperties()); 033 } 034 035}