Author: rmannibucau Date: Wed Oct 19 08:13:59 2016 New Revision: 1765551 URL: http://svn.apache.org/viewvc?rev=1765551&view=rev Log: simple test with cdi activated
Added: openwebbeans/microwave/trunk/microwave-core/src/test/java/org/superbiz/app/Injectable.java Modified: openwebbeans/microwave/trunk/microwave-core/src/test/java/org/superbiz/app/Endpoint.java Modified: openwebbeans/microwave/trunk/microwave-core/src/test/java/org/superbiz/app/Endpoint.java URL: http://svn.apache.org/viewvc/openwebbeans/microwave/trunk/microwave-core/src/test/java/org/superbiz/app/Endpoint.java?rev=1765551&r1=1765550&r2=1765551&view=diff ============================================================================== --- openwebbeans/microwave/trunk/microwave-core/src/test/java/org/superbiz/app/Endpoint.java (original) +++ openwebbeans/microwave/trunk/microwave-core/src/test/java/org/superbiz/app/Endpoint.java Wed Oct 19 08:13:59 2016 @@ -23,6 +23,7 @@ import lombok.Data; import lombok.NoArgsConstructor; import javax.enterprise.context.ApplicationScoped; +import javax.inject.Inject; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; @@ -31,10 +32,13 @@ import javax.ws.rs.core.MediaType; @Path("test") @ApplicationScoped public class Endpoint { + @Inject + private Injectable injectable; + @GET @Produces(MediaType.TEXT_PLAIN) public String simple() { - return "simple"; + return Boolean.parseBoolean(injectable.injected()) ? "simple" : "fail"; } @GET Added: openwebbeans/microwave/trunk/microwave-core/src/test/java/org/superbiz/app/Injectable.java URL: http://svn.apache.org/viewvc/openwebbeans/microwave/trunk/microwave-core/src/test/java/org/superbiz/app/Injectable.java?rev=1765551&view=auto ============================================================================== --- openwebbeans/microwave/trunk/microwave-core/src/test/java/org/superbiz/app/Injectable.java (added) +++ openwebbeans/microwave/trunk/microwave-core/src/test/java/org/superbiz/app/Injectable.java Wed Oct 19 08:13:59 2016 @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.superbiz.app; + +import javax.enterprise.context.ApplicationScoped; + +@ApplicationScoped +public class Injectable { + public String injected() { + return "true"; + } +}