GAEncodingTest

GADriverTest subclass: #'GAEncodingTest' 

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

Class Method Details

isAbstract

isAbstract

Instance Method Details

encoding

performTest

performTest

setUp

super setUp.

setUp

testEncodeArgumentsInPreparedStatements

testEncodeArgumentsInPreparedStatements
| characters result statement |
conn supportsPreparedStatements 
ifFalse: ^self skip ].

characters := 'áèîÑçö'.
statement := conn prepare: 'INSERT INTO student(id, description) VALUES(1, ?)'.
statement at: 1 bind: characters.
statement execute
result := conn execute: 'SELECT description FROM student WHERE id=1'.
self assert: (result first at: 1) equals: characters

testEncoder

testSpecialCharacters

testSpecialCharacters

testSpecialCharacters2

testSpecialCharacters2WithoutQueryEncoding

testSpecialCharacters2WithoutQueryEncoding

testSpecialCharacters3

testSpecialCharacters3

testSpecialCharacters3WithoutQueryEncoding

testSpecialCharacters3WithoutQueryEncoding

testSpecialCharactersWithoutQueryEncoding

testSpecialCharactersWithoutQueryEncoding
| characters result |
conn supportsAutomaticQueryEncoding 
ifFalse: ^self skip ].

characters := 'áèîÑçö'.
conn execute: ('INSERT INTO student(id, description) VALUES(1, '' , characters) , '')'.
result := conn execute: 'SELECT description FROM student WHERE id=1'.
self assert: (result first at: 1) equals: characters