Skip to content

Commit

Permalink
Merge pull request #15 from zweidenker/add-mocked-responses
Browse files Browse the repository at this point in the history
added mocked responses for stop refinement request returning with invalid coordinates
  • Loading branch information
bocasti authored Mar 26, 2021
2 parents 1e92d8d + 911664b commit 0307548
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions src/Trias-Client/TriasMockClient.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ TriasMockClient >> installMockStopRefinementAtRandomLocations: aNumberOfMocks [
longitude: '8.' , (eachIndex asString padLeftTo: 5 with: $0)) ]
]

{ #category : #'services - mocking' }
TriasMockClient >> installMockStopRefinementWithInvalidCoordinates: aNumberOfMocks [
1 to: aNumberOfMocks do: [ :eachIndex |
self installMockStopRefinement: (self mockForStopRefinementWithInvalidCoordinates ) ]
]

{ #category : #'services - mocking' }
TriasMockClient >> installMockTrip [

Expand Down Expand Up @@ -313,6 +319,47 @@ TriasMockClient >> mockForStopRefinementAtLatitude: aLatitude longitude: aLongit
</Trias>'
]
{ #category : #'private - mocking' }
TriasMockClient >> mockForStopRefinementWithInvalidCoordinates [
^ '<?xml version="1.0" encoding="UTF-8"?>
<Trias xmlns="http://www.vdv.de/trias" version="1.1">
<ServiceDelivery>
<ResponseTimestamp xmlns="http://www.siri.org.uk/siri">2021-03-26T09:08:30Z</ResponseTimestamp>
<ProducerRef xmlns="http://www.siri.org.uk/siri">EFAController10.3.17.15-EFA01</ProducerRef>
<Status xmlns="http://www.siri.org.uk/siri">true</Status>
<MoreData>false</MoreData>
<Language>de</Language>
<DeliveryPayload>
<LocationInformationResponse>
<Location>
<Location>
<StopPoint>
<StopPointRef>de:08236:2315</StopPointRef>
<StopPointName>
<Text>Diefenbach (Württ), Schule</Text>
<Language>de</Language>
</StopPointName>
<LocalityRef>8236061:1</LocalityRef>
</StopPoint>
<LocationName>
<Text>Diefenbach (Württ)</Text>
<Language>de</Language>
</LocationName>
<GeoPosition>
<Longitude>2147483647.00000</Longitude>
<Latitude>2147483647.00000</Latitude>
</GeoPosition>
</Location>
<Complete>true</Complete>
<Probability>1</Probability>
</Location>
</LocationInformationResponse>
</DeliveryPayload>
</ServiceDelivery>
</Trias>'
]
{ #category : #'private - mocking' }
TriasMockClient >> mockForTrip [
Expand Down

0 comments on commit 0307548

Please sign in to comment.