Last active
February 8, 2018 15:58
-
-
Save sonOfRa/dd337372e75b8a86fa68aeac6d0094ef to your computer and use it in GitHub Desktop.
This file contains hidden or 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 de.slevermann.pwhash.crypt; | |
import org.testng.annotations.DataProvider; | |
public class Sha256CryptProvider { | |
@DataProvider | |
public Object[][] externalHashes() { | |
return new Object[][] { | |
{"asdf", "asdf"}, | |
{"foo", "foo"} | |
}; | |
} | |
} |
This file contains hidden or 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 de.slevermann.pwhash.crypt; | |
import org.testng.annotations.Test; | |
@Test(dataProviderClass = Sha256CryptProvider.class) | |
public class Sha256CryptTest extends ShaCryptTest { | |
public Sha256CryptTest() { | |
this.s = new Sha256CryptStrategy(); | |
} | |
} |
This file contains hidden or 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 de.slevermann.pwhash.crypt; | |
import org.testng.annotations.Test; | |
public abstract class ShaCryptTest { | |
ShaCryptStrategy s; | |
@Test(dataProvider = "externalHashes") | |
public void verifyExternalHashes(String hash, String password) { | |
System.out.println(hash); | |
System.out.println(password); | |
} | |
} |
This file contains hidden or 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
org.testng.TestNGException: | |
Method public void de.slevermann.pwhash.crypt.ShaCryptTest.verifyExternalHashes(java.lang.String,java.lang.String) requires a @DataProvider named : externalHashes | |
at org.testng.internal.Parameters.findDataProvider(Parameters.java:513) | |
at org.testng.internal.Parameters.handleParameters(Parameters.java:691) | |
at org.testng.internal.ParameterHandler.handleParameters(ParameterHandler.java:49) | |
at org.testng.internal.ParameterHandler.createParameters(ParameterHandler.java:37) | |
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:914) | |
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125) | |
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109) | |
at org.testng.TestRunner.privateRun(TestRunner.java:648) | |
at org.testng.TestRunner.run(TestRunner.java:505) | |
at org.testng.SuiteRunner.runTest(SuiteRunner.java:455) | |
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450) | |
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415) | |
at org.testng.SuiteRunner.run(SuiteRunner.java:364) | |
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) | |
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84) | |
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1187) | |
at org.testng.TestNG.runSuitesLocally(TestNG.java:1116) | |
at org.testng.TestNG.runSuites(TestNG.java:1028) | |
at org.testng.TestNG.run(TestNG.java:996) | |
at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72) | |
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:123) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment