@@ -20,7 +20,7 @@ import (
2020
2121 "github.com/samber/lo"
2222 "github.com/samber/ro"
23- "github.com/samber/ro/testing"
23+ rotesting "github.com/samber/ro/testing"
2424 "github.com/stretchr/testify/assert"
2525)
2626
@@ -39,7 +39,7 @@ type testifyAssertion[T any] struct {
3939// observable sequence.
4040//
4141// Inspired by Flux.
42- func Testify [T any ](is * assert.Assertions ) testing .AssertSpec [T ] {
42+ func Testify [T any ](is * assert.Assertions ) rotesting .AssertSpec [T ] {
4343 return & testify [T ]{
4444 is : is ,
4545 assertions : []testifyAssertion [T ]{},
@@ -66,15 +66,15 @@ func (t *testify[T]) hasErrorOrCompletionNotification() bool {
6666}
6767
6868// Source sets the source observable for the test.
69- func (t * testify [T ]) Source (source ro.Observable [T ]) testing .AssertSpec [T ] {
69+ func (t * testify [T ]) Source (source ro.Observable [T ]) rotesting .AssertSpec [T ] {
7070 t .source = source
7171 return t
7272}
7373
7474// ExpectNext expects the next value to be emitted by the source observable.
7575// It fails the test if the next value is not emitted. If the source observable
7676// emits an error or completes, it fails the test.
77- func (t * testify [T ]) ExpectNext (value T , msgAndArgs ... any ) testing .AssertSpec [T ] {
77+ func (t * testify [T ]) ExpectNext (value T , msgAndArgs ... any ) rotesting .AssertSpec [T ] {
7878 assertion := testifyAssertion [T ]{
7979 notification : ro .NewNotificationNext (value ),
8080 msgAndArgs : msgAndArgs ,
@@ -86,7 +86,7 @@ func (t *testify[T]) ExpectNext(value T, msgAndArgs ...any) testing.AssertSpec[T
8686// ExpectNextSeq expects the next values to be emitted by the source observable.
8787// It fails the test if the next values are not emitted. If the source observable
8888// emits an error or completes, it fails the test.
89- func (t * testify [T ]) ExpectNextSeq (values ... T ) testing .AssertSpec [T ] {
89+ func (t * testify [T ]) ExpectNextSeq (values ... T ) rotesting .AssertSpec [T ] {
9090 for i := range values {
9191 assertion := testifyAssertion [T ]{
9292 notification : ro .NewNotificationNext (values [i ]),
@@ -101,7 +101,7 @@ func (t *testify[T]) ExpectNextSeq(values ...T) testing.AssertSpec[T] {
101101// if the source observable emits a value or completes. If the source observable
102102// emits an error, it compares the error with the expected error. If the error
103103// is not equal to the expected error, it fails the test.
104- func (t * testify [T ]) ExpectError (err error , msgAndArgs ... any ) testing .AssertSpec [T ] {
104+ func (t * testify [T ]) ExpectError (err error , msgAndArgs ... any ) rotesting .AssertSpec [T ] {
105105 if t .hasErrorOrCompletionNotification () {
106106 t .is .Fail ("cannot have multiple error or completion notifications" )
107107 }
@@ -116,7 +116,7 @@ func (t *testify[T]) ExpectError(err error, msgAndArgs ...any) testing.AssertSpe
116116
117117// ExpectComplete expects the source observable to complete. It fails the test
118118// if the source observable emits a value or an error.
119- func (t * testify [T ]) ExpectComplete (msgAndArgs ... any ) testing .AssertSpec [T ] {
119+ func (t * testify [T ]) ExpectComplete (msgAndArgs ... any ) rotesting .AssertSpec [T ] {
120120 if t .hasErrorOrCompletionNotification () {
121121 t .is .Fail ("cannot have multiple error or completion notifications" )
122122 }
0 commit comments