|
| 1 | +/** |
| 2 | + * Copyright Google LLC |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * https://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | + |
| 17 | + |
| 18 | +/** |
| 19 | + * Tests createDatabase function of jdbc.gs |
| 20 | + */ |
| 21 | +function itShouldCreateDatabase() { |
| 22 | + Logger.log('itShouldCreateDatabase'); |
| 23 | + createDatabase(); |
| 24 | +} |
| 25 | + |
| 26 | +/** |
| 27 | + * Tests createUser function of jdbc.gs |
| 28 | + */ |
| 29 | +function itShouldCreateUser() { |
| 30 | + Logger.log('itShouldCreateUser'); |
| 31 | + createUser(); |
| 32 | +} |
| 33 | + |
| 34 | +/** |
| 35 | + * Tests createTable function of jdbc.gs |
| 36 | + */ |
| 37 | +function itShouldCreateTable() { |
| 38 | + Logger.log('itShouldCreateTable'); |
| 39 | + createTable(); |
| 40 | +} |
| 41 | + |
| 42 | +/** |
| 43 | + * Tests writeOneRecord function of jdbc.gs |
| 44 | + */ |
| 45 | +function itShouldWriteOneRecord() { |
| 46 | + Logger.log('itShouldWriteOneRecord'); |
| 47 | + writeOneRecord(); |
| 48 | +} |
| 49 | + |
| 50 | +/** |
| 51 | + * Tests writeManyRecords function of jdbc.gs |
| 52 | + */ |
| 53 | +function itShouldWriteManyRecords() { |
| 54 | + Logger.log('itShouldWriteManyRecords'); |
| 55 | + writeManyRecords(); |
| 56 | +} |
| 57 | + |
| 58 | +/** |
| 59 | + * Tests readFromTable function of jdbc.gs |
| 60 | + */ |
| 61 | +function itShouldReadFromTable() { |
| 62 | + Logger.log('itShouldReadFromTable'); |
| 63 | + readFromTable(); |
| 64 | +} |
| 65 | + |
| 66 | +/** |
| 67 | + * Runs all the tests |
| 68 | + */ |
| 69 | +function RUN_ALL_TESTS() { |
| 70 | + itShouldCreateDatabase(); |
| 71 | + itShouldCreateUser(); |
| 72 | + itShouldCreateTable(); |
| 73 | + itShouldWriteOneRecord(); |
| 74 | + itShouldWriteManyRecords(); |
| 75 | + itShouldReadFromTable(); |
| 76 | +} |
0 commit comments