Stub test namespaces
Outline some of the things we might test.
This commit is contained in:
parent
3b0b059f62
commit
42cfe88859
6 changed files with 25 additions and 0 deletions
|
|
@ -1,6 +1,11 @@
|
||||||
;; copyright (c) 2019 Sean Corfield, all rights reserved
|
;; copyright (c) 2019 Sean Corfield, all rights reserved
|
||||||
|
|
||||||
(ns next.jdbc.connection-test
|
(ns next.jdbc.connection-test
|
||||||
|
"Tests for the main hash map spec to JDBC URL logic and the get-datasource
|
||||||
|
and get-connection protocol implementations.
|
||||||
|
|
||||||
|
At some point, the datasource/connection tests should probably be extended
|
||||||
|
to accept EDN specs from an external source (environment variables?)."
|
||||||
(:require [clojure.string :as str]
|
(:require [clojure.string :as str]
|
||||||
[clojure.test :refer [deftest is testing]]
|
[clojure.test :refer [deftest is testing]]
|
||||||
[next.jdbc.connection :as c]
|
[next.jdbc.connection :as c]
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,11 @@
|
||||||
;; copyright (c) 2019 Sean Corfield, all rights reserved
|
;; copyright (c) 2019 Sean Corfield, all rights reserved
|
||||||
|
|
||||||
(ns next.jdbc.prepare-test
|
(ns next.jdbc.prepare-test
|
||||||
|
"Stub test namespace for PreparedStatement creation etc.
|
||||||
|
|
||||||
|
This functionality is core to all of the higher-level stuff so it mostly
|
||||||
|
gets tested that way, but there should be some dedicated tests in here
|
||||||
|
eventually that ensure all of the options specific to PreparedStatement
|
||||||
|
actually work they way they're supposed to!"
|
||||||
(:require [clojure.test :refer [deftest is testing]]
|
(:require [clojure.test :refer [deftest is testing]]
|
||||||
[next.jdbc.prepare :refer :all]))
|
[next.jdbc.prepare :refer :all]))
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
;; copyright (c) 2019 Sean Corfield, all rights reserved
|
;; copyright (c) 2019 Sean Corfield, all rights reserved
|
||||||
|
|
||||||
(ns next.jdbc.protocols-test
|
(ns next.jdbc.protocols-test
|
||||||
|
"Stub test namespace for low-level protocols. Nothing can really be tested
|
||||||
|
at this level tho'..."
|
||||||
(:require [clojure.test :refer [deftest is testing]]
|
(:require [clojure.test :refer [deftest is testing]]
|
||||||
[next.jdbc.protocols :refer :all]))
|
[next.jdbc.protocols :refer :all]))
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
;; copyright (c) 2019 Sean Corfield, all rights reserved
|
;; copyright (c) 2019 Sean Corfield, all rights reserved
|
||||||
|
|
||||||
(ns next.jdbc.quoted-test
|
(ns next.jdbc.quoted-test
|
||||||
|
"Basic tests for quoting strategies. These are also tested indirectly
|
||||||
|
via the next.jdbc.sql tests."
|
||||||
(:require [clojure.test :refer [deftest are]]
|
(:require [clojure.test :refer [deftest are]]
|
||||||
[next.jdbc.quoted :refer :all]))
|
[next.jdbc.quoted :refer :all]))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,14 @@
|
||||||
;; copyright (c) 2019 Sean Corfield, all rights reserved
|
;; copyright (c) 2019 Sean Corfield, all rights reserved
|
||||||
|
|
||||||
(ns next.jdbc.result-set-test
|
(ns next.jdbc.result-set-test
|
||||||
|
"Stub test namespace for the result set functions.
|
||||||
|
|
||||||
|
There's so much that should be tested here:
|
||||||
|
* column name generation functions
|
||||||
|
* ReadableColumn protocol extension point
|
||||||
|
* RowBuilder and ResultSetBuilder machinery
|
||||||
|
* datafy/nav support
|
||||||
|
* ResultSet-as-map for reducible! / -execute protocol
|
||||||
|
* -execute-one and -execute-all implementations"
|
||||||
(:require [clojure.test :refer [deftest is testing]]
|
(:require [clojure.test :refer [deftest is testing]]
|
||||||
[next.jdbc.result-set :refer :all]))
|
[next.jdbc.result-set :refer :all]))
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
;; copyright (c) 2019 Sean Corfield, all rights reserved
|
;; copyright (c) 2019 Sean Corfield, all rights reserved
|
||||||
|
|
||||||
(ns next.jdbc.transaction-test
|
(ns next.jdbc.transaction-test
|
||||||
|
"Stub test namespace for transaction handling."
|
||||||
(:require [clojure.test :refer [deftest is testing]]
|
(:require [clojure.test :refer [deftest is testing]]
|
||||||
[next.jdbc.transaction :refer :all]))
|
[next.jdbc.transaction :refer :all]))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue