View ShouldNotInjectStringTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.needle4j.injection; | |
import org.junit.Assert; | |
import org.junit.Rule; | |
import org.junit.Test; | |
import org.needle4j.annotation.InjectIntoMany; | |
import org.needle4j.annotation.ObjectUnderTest; | |
import org.needle4j.junit.NeedleBuilders; | |
import org.needle4j.junit.NeedleRule; |
View PlaygroundApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.github.jangalinski.deltaspike; | |
import org.apache.deltaspike.cdise.api.CdiContainer; | |
import org.apache.deltaspike.cdise.api.CdiContainerLoader; | |
import org.apache.deltaspike.core.api.provider.BeanProvider; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import javax.annotation.PostConstruct; | |
import javax.enterprise.context.ApplicationScoped; |
View _26177485Test.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.github.jangalinski; | |
import org.assertj.core.api.Assertions; | |
import org.jboss.weld.environment.se.Weld; | |
import org.jboss.weld.environment.se.WeldContainer; | |
import org.junit.After; | |
import org.junit.Before; | |
import org.junit.Test; |
View finalLoggerReplace.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private Logger replaceLoggerConstantWithMock() throws Exception { | |
final Field field = DropwizardResourceConfig.class.getDeclaredField("LOGGER"); | |
final Field modifiersField = Field.class.getDeclaredField("modifiers"); | |
modifiersField.setAccessible(true); | |
modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL); | |
field.setAccessible(true); | |
field.set(null,mock(Logger.class); | |
return (Logger) field.get(null); |
View pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependencies> | |
<dependency> | |
<groupId>org.scala-lang</groupId> | |
<artifactId>scala-library</artifactId> | |
<version>${scala.version}</version> | |
</dependency> | |
</dependencies> | |
<build> |
View BuzzwordClockApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.github.jangalinski.playground.clock; | |
import com.vaadin.annotations.Push; | |
import com.vaadin.server.VaadinRequest; | |
import com.vaadin.spring.annotation.SpringUI; | |
import com.vaadin.ui.Label; | |
import com.vaadin.ui.UI; | |
import com.vaadin.ui.VerticalLayout; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.boot.SpringApplication; |
View jboss-deployment-structure.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<ear-subdeployments-isolated>false</ear-subdeployments-isolated> | |
<!-- | |
I have a ear deployment, I'm specifying only the module which is client of the EJB Remote module running in AS5. | |
My client class is itself an EJB 3.1 running in JBoss AS7. It is client of an EJB 2.0 running in JBoss AS5. | |
--> | |
<sub-deployment name="my-ejb-module-on-as7-${project.version}.jar"> | |
<dependencies> |
View GuiceSingletonProviderTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.github.jangalinski; | |
import com.google.inject.AbstractModule; | |
import com.google.inject.Guice; | |
import com.google.inject.Injector; | |
import org.junit.Test; | |
import javax.inject.Provider; | |
import javax.inject.Singleton; |
View CandidateAssigneDoesNotWorkTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.camunda.bpm.extension.mockito; | |
import org.camunda.bpm.engine.delegate.DelegateTask; | |
import org.camunda.bpm.engine.delegate.TaskListener; | |
import org.camunda.bpm.engine.runtime.ProcessInstance; | |
import org.camunda.bpm.engine.test.Deployment; | |
import org.camunda.bpm.engine.test.ProcessEngineRule; | |
import org.junit.Before; | |
import org.junit.Rule; | |
import org.junit.Test; |
View MyBean.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public MyBean { | |
private String value; | |
@PostConstruct | |
public void initValue() { | |
value = new PropertyReader("file").getValue("parameter"); | |
} | |
} |
OlderNewer