[🤖] Add Unit-Tests
Build Docker and Deploy / Run goext test-suite (push) Successful in 1m34s

This commit is contained in:
2026-04-27 10:46:08 +02:00
parent dad0e3240d
commit 02d6894ec6
116 changed files with 18795 additions and 1 deletions
+29
View File
@@ -0,0 +1,29 @@
package cursortoken
import (
"git.blackforestbytes.com/BlackForestBytes/goext/tst"
"testing"
)
func TestSortDirectionToMongoASC(t *testing.T) {
tst.AssertEqual(t, SortASC.ToMongo(), 1)
}
func TestSortDirectionToMongoDESC(t *testing.T) {
tst.AssertEqual(t, SortDESC.ToMongo(), -1)
}
func TestSortDirectionToMongoEmpty(t *testing.T) {
var sd SortDirection
tst.AssertEqual(t, sd.ToMongo(), 0)
}
func TestSortDirectionToMongoUnknown(t *testing.T) {
sd := SortDirection("xyz")
tst.AssertEqual(t, sd.ToMongo(), 0)
}
func TestSortDirectionConstants(t *testing.T) {
tst.AssertEqual(t, string(SortASC), "ASC")
tst.AssertEqual(t, string(SortDESC), "DESC")
}