Skip to content

Commit

Permalink
Consolidate in one file
Browse files Browse the repository at this point in the history
  • Loading branch information
lpoulain committed Oct 1, 2013
1 parent 5ead9f1 commit 13557a3
Show file tree
Hide file tree
Showing 8 changed files with 369 additions and 327 deletions.
363 changes: 344 additions & 19 deletions Pickle.cls

Large diffs are not rendered by default.

11 changes: 7 additions & 4 deletions PickleScenarios.cls
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,19 @@ global class PickleScenarios {
'Given the following Users:\r\n' +
'1|Laurent Poulain\r\n' +
'\r\n' +
'Given the following Account exist:\r\n' +
'Given the following Accounts exist:\r\n' +
'Account Id|Account Name\r\n' +
'2 |Foo Inc. \r\n' +
'3 |Bar Corp. \r\n' +
'\r\n' +
'Given the following Cases exist:\r\n' +
'Case Id|Account Id|Owner Id|Subject |Case Origin|Escalated\r\n' +
'3 |2 |1 |This is a test|Web |true \r\n' +
'Case Id|Account Id|Owner Id|Subject |Case Origin|Escalated\r\n' +
'4 |2 |1 |This is a test |Web |true \r\n' +
'5 |3 |1 |This is another test|Web |true \r\n' +
'\r\n' +
'then the query [SELECT Case Id, Subject FROM Case WHERE "Escalated" = true] should return:\r\n' +
'3|This is a test'),
'4|This is a test\r\n' +
'5|This is another test'),
new Scenario('My Controller', 2, 'Testing VF Page', 'PickleTest',
'Start Test\r\n' +
'Given I am on page "My VF Page" (PickleTest.MyVisualForceController)\r\n' +
Expand Down
4 changes: 2 additions & 2 deletions PickleScenarios.page
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<apex:page controller="PickleScenarios">
<apex:page controller="PickleScenarios" title="Picke Scenarios">

<script type="text/javascript">
var jobInterval;
Expand Down Expand Up @@ -69,4 +69,4 @@

</apex:form>

</apex:page>
</apex:page>
78 changes: 0 additions & 78 deletions PickleStepDataLoader.cls

This file was deleted.

72 changes: 0 additions & 72 deletions PickleStepSOQL.cls

This file was deleted.

34 changes: 0 additions & 34 deletions PickleStepUserMatch.cls

This file was deleted.

19 changes: 16 additions & 3 deletions PickleTest.cls
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,19 @@ public class PickleTest {
cp.registerStepDefinition(new StepCheckResult(cp));

// Runs the scenario. An exception is thrown if it fails

// You have two ways to run a scenario.
// The first is to run one directly:
/*
cp.runScenario('Test #1', 'Given I am on page "My VF Page" (PickleTest.MyVisualForceController)\r\n' +
'When I set "number" to "5"\r\n' +
'and I set "text" to "foo"\r\n' +
'and I set "select" to "23"\r\n' +
'and I click on "Compute"\r\n' +
'Then "result" should be >= "16"\r\n' +
'and the result should be 16');*/

// The other one is to run a scenarion from the scenario Repository:
PickleScenarios.run('My Controller',1,cp);
PickleScenarios.run('My Controller',2,cp);

Expand All @@ -97,10 +110,10 @@ public class PickleTest {
cp.randomTesting('My VF Page', 1000);*/
}

/* public static testMethod void test1() {
public static testMethod void test1() {
PickleTest st = new PickleTest();
}
*/

public static testMethod void test2() {
CustomPickle cp = new CustomPickle();
PickleScenarios.run('My Other Controller',1,cp);
Expand Down Expand Up @@ -135,4 +148,4 @@ public class PickleTest {
cp.runScenario('Test', 'Start Test\r\nStop Test');
}
*/
}
}
115 changes: 0 additions & 115 deletions PickleUtil.cls

This file was deleted.

0 comments on commit 13557a3

Please sign in to comment.