コード例 #1
0
        public async Task WhenTheConnectorIsDeleted(int connectorId)
        {
            GroupResource groupResource = await _groupDriver.ParseFromResponse <GroupResource>((HttpResponseMessage)_scenarioContext["createdGroupResponse"]);

            ChargeStationResource chargeStationResource = await _chargeStationDriver.ParseFromResponse <ChargeStationResource>((HttpResponseMessage)_scenarioContext["createdChargeStationResponse"]);

            chargeStationResource.Id.Should().NotBeEmpty();
            chargeStationResource.Name.Should().NotBeEmpty();

            _scenarioContext["deletedConnectorId"]       = connectorId;
            _scenarioContext["deletedConnectorResponse"] = await _connectorDriver.DeleteConnector(groupResource.Id, chargeStationResource.Id, connectorId);
        }
コード例 #2
0
        public async Task WhenTheChargeStationIsUpdated()
        {
            _scenarioContext["createdGroupResponse"].Should().NotBeNull();
            _scenarioContext["createdChargeStationResponse"].Should().NotBeNull();
            GroupResource groupResponse = await _groupDriver.ParseFromResponse <GroupResource>((HttpResponseMessage)_scenarioContext["createdGroupResponse"]);

            ChargeStationResource chargeStation = await _chargeStationDriver.ParseFromResponse <ChargeStationResource>((HttpResponseMessage)_scenarioContext["createdChargeStationResponse"]);

            SaveChargeStationResource _createChargeStation = ((SaveChargeStationResource)_scenarioContext["createChargeStation"]);

            _scenarioContext["updatedChargeStation"] = await _chargeStationDriver.UpdateChargeStation(groupResponse.Id, chargeStation.Id, _createChargeStation.Name);
        }