BAEL-812: List of Rules Engines in Java (#2319)

* spring beans DI examples

* fix-1: shortening examples

* List of Rules Engines in Java

* BAEL-812: Openl-Tablets example added

* BAEL-812: artifacts names changed
This commit is contained in:
felipeazv
2017-08-16 21:58:42 +02:00
committed by adamd1985
parent 4226100ea9
commit dc105bc6f2
16 changed files with 337 additions and 0 deletions
@@ -0,0 +1,25 @@
package com.baeldung.autowired;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class TypesOfBeanInjectionSpringIntegrationTest {
@Autowired
UserService userService;
private static final String[] expected = new String[] { "Snoopy", "Woodstock", "Charlie Brown" };
@Test
public void givenDI_whenInjectObject_thenUserNamesAreListed() {
Assert.assertArrayEquals(expected, userService.listUsers()
.stream()
.map(User::getName)
.toArray());
}
}