-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from eupakhomov/0.5_cleanup_spec_added_to_json…
…_tests 0.5 cleanup spec added to json tests
- Loading branch information
Showing
49 changed files
with
382 additions
and
1,081 deletions.
There are no files selected for viewing
This file contains 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
47 changes: 47 additions & 0 deletions
47
ocpp-v1_6-test/src/test/groovy/eu/chargetime/ocpp/test/base/json/JSONBaseSpec.groovy
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package eu.chargetime.ocpp.test.base.json | ||
|
||
import eu.chargetime.ocpp.test.FakeCentral | ||
import eu.chargetime.ocpp.test.FakeCentralSystem | ||
import eu.chargetime.ocpp.test.FakeChargePoint | ||
import spock.lang.Shared | ||
import spock.lang.Specification | ||
import spock.util.concurrent.PollingConditions | ||
|
||
abstract class JSONBaseSpec extends Specification { | ||
@Shared | ||
FakeCentralSystem centralSystem = FakeCentral.getSystem(FakeCentral.serverType.JSON) | ||
@Shared | ||
FakeChargePoint chargePoint = new FakeChargePoint() | ||
|
||
def setupSpec() { | ||
def conditions = new PollingConditions(timeout: 10) | ||
|
||
// When a Central System is running | ||
centralSystem.started() | ||
|
||
conditions.eventually { | ||
assert !centralSystem.isClosed() | ||
} | ||
} | ||
|
||
def setup() { | ||
Thread.sleep(100); | ||
|
||
chargePoint.connect() | ||
} | ||
|
||
def cleanup() { | ||
chargePoint.disconnect() | ||
centralSystem.clearRiggedToFailFlag() | ||
} | ||
|
||
def cleanupSpec() { | ||
def conditions = new PollingConditions(timeout: 10) | ||
|
||
centralSystem.stopped() | ||
|
||
conditions.eventually { | ||
assert centralSystem.isClosed() | ||
} | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
ocpp-v1_6-test/src/test/groovy/eu/chargetime/ocpp/test/base/soap/SOAPBaseSpec.groovy
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package eu.chargetime.ocpp.test.base.soap | ||
|
||
import eu.chargetime.ocpp.test.FakeCentral | ||
import eu.chargetime.ocpp.test.FakeCentralSystem | ||
import eu.chargetime.ocpp.test.FakeChargePoint | ||
import spock.lang.Shared | ||
import spock.lang.Specification | ||
|
||
|
||
abstract class SOAPBaseSpec extends Specification | ||
{ | ||
@Shared | ||
FakeCentralSystem centralSystem = new FakeCentralSystem(FakeCentral.serverType.SOAP) | ||
@Shared | ||
FakeChargePoint chargePoint = new FakeChargePoint(FakeChargePoint.clientType.SOAP) | ||
|
||
def setupSpec() { | ||
// When a Central System is running | ||
centralSystem.started() | ||
} | ||
|
||
def setup() { | ||
chargePoint.connect() | ||
} | ||
|
||
def cleanup() { | ||
chargePoint.disconnect() | ||
} | ||
|
||
def cleanupSpec() { | ||
centralSystem.stopped() | ||
} | ||
} |
25 changes: 2 additions & 23 deletions
25
ocpp-v1_6-test/src/test/groovy/eu/chargetime/ocpp/test/core/json/JSONAuthorizeSpec.groovy
This file contains 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
26 changes: 3 additions & 23 deletions
26
..._6-test/src/test/groovy/eu/chargetime/ocpp/test/core/json/JSONBootNotificationSpec.groovy
This file contains 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
25 changes: 2 additions & 23 deletions
25
...-test/src/test/groovy/eu/chargetime/ocpp/test/core/json/JSONChangeAvailabilitySpec.groovy
This file contains 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
31 changes: 5 additions & 26 deletions
31
...test/src/test/groovy/eu/chargetime/ocpp/test/core/json/JSONChangeConfigurationSpec.groovy
This file contains 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
26 changes: 2 additions & 24 deletions
26
ocpp-v1_6-test/src/test/groovy/eu/chargetime/ocpp/test/core/json/JSONClearCacheSpec.groovy
This file contains 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
26 changes: 2 additions & 24 deletions
26
ocpp-v1_6-test/src/test/groovy/eu/chargetime/ocpp/test/core/json/JSONDataTransferSpec.groovy
This file contains 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
Oops, something went wrong.