summaryrefslogtreecommitdiff
path: root/DAL/DB/CRUD_test.go
diff options
context:
space:
mode:
authorPhysick <96335032+DegustatorPonos@users.noreply.github.com>2025-11-29 20:18:11 +0500
committerPhysick <96335032+DegustatorPonos@users.noreply.github.com>2025-11-29 20:18:11 +0500
commite07dca81d05f304865a59c8afee98a3cde8bce8c (patch)
tree2dd01bbc5fd20b6ae024f0c18eb8946887ae9339 /DAL/DB/CRUD_test.go
Project init
Diffstat (limited to 'DAL/DB/CRUD_test.go')
-rw-r--r--DAL/DB/CRUD_test.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/DAL/DB/CRUD_test.go b/DAL/DB/CRUD_test.go
new file mode 100644
index 0000000..de6fd40
--- /dev/null
+++ b/DAL/DB/CRUD_test.go
@@ -0,0 +1,25 @@
+package db
+
+import (
+ "testing"
+ "time"
+)
+
+type testDataType struct {
+ Id uint64
+ Name string
+ Data time.Time
+}
+
+var testDataTable = DataTable[testDataType] {
+ TableName: "DataTable",
+}
+
+func TestFormSelectRequest(t *testing.T) {
+ var expected = "SELECT (Id, Name, Data) FROM DataTable;"
+ var request = testDataTable.formSelectRequest()
+ if request != expected {
+ t.Errorf("Incorrect select query. \n Expected: '%s' \n Got: '%s'", expected, request)
+ }
+}
+