Skip to content

Latest commit

 

History

History
91 lines (64 loc) · 1.73 KB

README.md

File metadata and controls

91 lines (64 loc) · 1.73 KB

Secret - Is The Secret Function Additive

How To Run

$ mvn package exec:exec

Table of contents


Output

...
[INFO] --- exec-maven-plugin:1.5.0:exec (default-cli) @ Secret ---
secret was additive
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.581 s
...

OR

...
[INFO] --- exec-maven-plugin:1.5.0:exec (default-cli) @ Secret ---
secret was not additive
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.718 s
...

Custom Runtime Config

You can customize the class and method that are used for secret's implementation using the following system variable configurations.

$ mvn package
$ java -Dsecret.classname=com.example.codechallenge.utilities.SecretImplementations -Dsecret.methodname=secretFailure1 -jar target/Secret-1.0.jar 12

secret() must be public and static.

Provided Implementations

Classes

  • com.example.codechallenge.utilities.SecretImplementations

Methods

  • secretSuccess1
  • secretFailure1
  • secretFailure2
  • secretFailure3
  • secretFailureEvil

Unit Tests

$ mvn test

Eclipse

You can build an ecplise project by issuing the following command:

$ mvn eclipse:eclipse

Technical Details

jdk version: 1.7

Dependencies:

  • Maven 3.3.9
  • JUnit 4.11