Fix CDI package names (#7715)

* Fix beans.xsd location for JavaEE 7

* Fix cdi2observers package names
This commit is contained in:
Yuriy Artamonov 2019-10-01 22:33:11 +03:00 committed by maibin
parent 823bc9d4b0
commit da1db18bc9
9 changed files with 97 additions and 94 deletions

View File

@ -1,6 +1,7 @@
package com.baeldung.cdi.cdi2observers.application;
package com.baeldung.cdi2observers.application;
import com.baeldung.cdi2observers.events.ExampleEvent;
import com.baeldung.cdi.cdi2observers.events.ExampleEvent;
import javax.enterprise.inject.se.SeContainer;
import javax.enterprise.inject.se.SeContainerInitializer;

View File

@ -1,4 +1,4 @@
package com.baeldung.cdi.cdi2observers.events;
package com.baeldung.cdi2observers.events;
public class ExampleEvent {

View File

@ -1,4 +1,4 @@
package com.baeldung.cdi.cdi2observers.events;
package com.baeldung.cdi2observers.events;
import javax.enterprise.event.Event;
import javax.inject.Inject;

View File

@ -1,6 +1,7 @@
package com.baeldung.cdi.cdi2observers.observers;
package com.baeldung.cdi2observers.observers;
import com.baeldung.cdi2observers.events.ExampleEvent;
import com.baeldung.cdi.cdi2observers.events.ExampleEvent;
import javax.annotation.Priority;
import javax.enterprise.event.Observes;

View File

@ -1,7 +1,7 @@
package com.baeldung.cdi.cdi2observers.observers;
package com.baeldung.cdi2observers.observers;
import com.baeldung.cdi.cdi2observers.events.ExampleEvent;
import com.baeldung.cdi.cdi2observers.services.TextService;
import com.baeldung.cdi2observers.events.ExampleEvent;
import com.baeldung.cdi2observers.services.TextService;
import javax.annotation.Priority;
import javax.enterprise.event.Observes;

View File

@ -1,4 +1,4 @@
package com.baeldung.cdi.cdi2observers.services;
package com.baeldung.cdi2observers.services;
public class TextService {

View File

@ -1,7 +1,8 @@
<beans xmlns="http://java.sun.com/xml/ns/javaee"
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/beans_1_2.xsd">
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
bean-discovery-mode="all">
<interceptors>
<class>com.baeldung.interceptor.AuditedInterceptor</class>
</interceptors>

View File

@ -1,9 +1,10 @@
package com.baeldung.cdi.cdi2observers.tests;
package com.baeldung.test.cdi2observers.tests;
import com.baeldung.cdi.cdi2observers.services.TextService;
import static org.assertj.core.api.Assertions.assertThat;
import com.baeldung.cdi2observers.services.TextService;
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
public class TextServiceUnitTest {
@Test

View File

@ -6,7 +6,6 @@ import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test;
public class TimeLoggerFactoryUnitTest {
@Test
public void givenTimeLoggerFactory_whenCalledgetTimeLogger_thenOneAssertion() {
TimeLoggerFactory timeLoggerFactory = new TimeLoggerFactory();