pattern: Active-Object pattern. (#1660)
* Closes #65. * Removed * Removed unnecessary files. Added logging. Closes Fixes #1660. * Added Terminition condition. * Logger implemented. Removed maven wrapper. * Added module to parent POM. removed .gitignore * Replaced tabs with whitespaces, added Javadocs. * Fixed more whitespaces problems. * Fixed more checkstyle errors * More checkstyle errors. * Checkstyle errors. * Final checkstyle cleanup * Added UML file. Changed System.exit() to Runtime. * Changed buisiness logic and readme.md file * Changed typos and readme.md file * Fixed checkstyle errors * Fixed grammer errors and CircleCI bugs. * Wrong readme.md * Added Thread.interrupt() for after catching exception. * Fixed SonarCloud code smells. * Removed unused brackets. * Changed main program exit logic. Added tests. * Reverted abstract-factory * Cleaned code * Added static to loggers. cleaned code smells. * Checkstyle errors. * Code Smells. Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
This commit is contained in:
@ -0,0 +1,19 @@
|
||||
package com.iluwatar.activeobject;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
class ActiveCreatureTest {
|
||||
|
||||
@Test
|
||||
void executionTest() throws InterruptedException {
|
||||
ActiveCreature orc = new Orc("orc1");
|
||||
assertEquals("orc1",orc.name());
|
||||
assertEquals(0,orc.getStatus());
|
||||
orc.eat();
|
||||
orc.roam();
|
||||
orc.kill(0);
|
||||
}
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user