GAConnectionStringTest
Overview
Please comment me using the following template inspired by Class Responsibility Collaborator (CRC) design:
For the Class part: State the name of the class with one line description: For example, I'm xxx the root of the hierarchy of visitor objects.
For the Responsibility part: Three sentences about my main responsibility, what I'm doing, what services do I offer.
For the Collaborators Part: State my main collaborators and one line about how I interact with them.
Public API and Key Messages
- label item
One simple example is simply gorgeous.
Internal Representation and Key Implementation Points.
Implementation Points
Instance Method Details
testConnectionStringDatabase
testConnectionStringDatabase| driver |
driver := GAConnectionString fromString: 'someDatabase://Host:1111/adatabase?user=username&password=password'.
self assert: driver database = 'adatabase'
testConnectionStringDefaultDatabase
testConnectionStringDefaultDatabase| driver |
driver := GAConnectionString fromString: 'someDatabase://Host:1111?user=username&password=password'.
self assert: driver database = ''
testConnectionStringDefaultPassword
testConnectionStringDefaultPassword| driver |
driver := GAConnectionString fromString: 'someDatabase://Host:1111'.
self assert: driver password = ''
testConnectionStringDefaultUser
testConnectionStringDefaultUser| driver |
driver := GAConnectionString fromString: 'someDatabase://Host:1111?password=password'.
self assert: driver user = ''
testConnectionStringHost
testConnectionStringHost| driver |
driver := GAConnectionString fromString: 'someDatabase://Host:1111/database?user=username&password=password'.
self assert: driver host = 'Host' asLowercase
testConnectionStringPassword
testConnectionStringPassword| driver |
driver := GAConnectionString fromString: 'someDatabase://Host:1111?password=pa55w0rd'.
self assert: driver password = 'pa55w0rd'
testConnectionStringPort
testConnectionStringPort| driver |
driver := GAConnectionString fromString: 'someDatabase://Host:1111/database?user=username&password=password'.
self assert: driver port = 1111
testConnectionStringUser
testConnectionStringUser| driver |
driver := GAConnectionString fromString: 'someDatabase://Host:1111?user=username&password=password'.
self assert: driver user = 'username'