2016. 5. 9. 15:15

교육자료 다운로드


 [lab103-egovgettingstarted.zip]

문제가 없으면 안되는 것일까?


HelloWorldServiceTest.java

package egovframework.guide.helloworld;


import static org.junit.Assert.assertEquals;

import javax.annotation.Resource;


import org.junit.Test;

import org.junit.runner.RunWith;

import org.springframework.test.context.ContextConfiguration;

import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;


@RunWith(SpringJUnit4ClassRunner.class)

@ContextConfiguration(locations = { "/context-helloworld.xml" })


public class HelloWorldServiceTest {

private HelloWorldService helloworld;


@Resource(name = "helloworld")

public void setHelloWorld(HelloWorldService hello) {

this.helloworld = hello;

}


@Test

public void SayHello() {

assertEquals("Hello eGovFrame!!!", helloworld.sayHello());

}

}


1. 

다음과 같은 에러를 만나셨다면?

Description Resource Path Location Type Java compiler level does not match the version of the installed Java project facet.
lab103 Unknown Faceted Project Problem (Java Version Mismatch)

>> 프로젝트의 Properties에서 Project Facets와 Java Compiler에서 Compiler compliance level을 맞춰 주세요.

2. 

다음과 같은 메시지가 Console에 표기된다면?

INFO [org.springframework.test.context.TestContextManager] Could not instantiate TestExecutionListener [org.springframework.test.context.web.ServletTestExecutionListener]. Specify custom listener classes or make the default listener classes (and their required dependencies) available. Offending class: [javax/servlet/ServletContext]


>> ㅠㅠ 잘 모르겠네요. 전자정부프레임워크에 질의를 해놨는데요. (너무 무식한 질문을 한 듯 하네요.)

(솔직히 제대로 실행이 된것인지? 아닌지?)


<> JUnit(Unit Testing)에 대해서 대해서 좀 더 살펴보고 업데이트 할 수 있도록 하겠습니다.





Posted by 모바일헌터