mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-23 13:52:26 +08:00
test: fix TestEventBus
This commit is contained in:
@@ -41,9 +41,9 @@ func TestEventBus_Unsubscribe(t *testing.T) {
|
|||||||
assert.Equal(0, receivedData)
|
assert.Equal(0, receivedData)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestEventBus_Subscribe_WithFilter(t *testing.T) {
|
func TestEventBus_Subscribe_withFilter(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
assert := internal.NewAssert(t, "TestEventBus_Subscribe_WithFilter")
|
assert := internal.NewAssert(t, "TestEventBus_Subscribe_withFilter")
|
||||||
|
|
||||||
eb := NewEventBus[int]()
|
eb := NewEventBus[int]()
|
||||||
|
|
||||||
@@ -64,9 +64,9 @@ func TestEventBus_Subscribe_WithFilter(t *testing.T) {
|
|||||||
assert.Equal(1, receivedData)
|
assert.Equal(1, receivedData)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestEventBus_Subscribe_WithPriority(t *testing.T) {
|
func TestEventBus_Subscribe_withPriority(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
assert := internal.NewAssert(t, "TestEventBus_Subscribe_WithPriority")
|
assert := internal.NewAssert(t, "TestEventBus_Subscribe_withPriority")
|
||||||
|
|
||||||
eb := NewEventBus[int]()
|
eb := NewEventBus[int]()
|
||||||
|
|
||||||
@@ -87,9 +87,9 @@ func TestEventBus_Subscribe_WithPriority(t *testing.T) {
|
|||||||
assert.Equal([]int{2, 1}, receivedData)
|
assert.Equal([]int{2, 1}, receivedData)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestEventBus_Subscribe_Async(t *testing.T) {
|
func TestEventBus_Subscribe_async(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
assert := internal.NewAssert(t, "TestEventBus_Subscribe_Async")
|
assert := internal.NewAssert(t, "TestEventBus_Subscribe_async")
|
||||||
|
|
||||||
eb := NewEventBus[string]()
|
eb := NewEventBus[string]()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user