@@ -45,7 +45,7 @@ func TestWorkflowRuntime(t *testing.T) {
45
45
require .NoError (t , err )
46
46
47
47
t .Run ("with explicit name" , func (t * testing.T ) {
48
- err := testWorker .RegisterWorkflow (testWorkflow , RegisterWithName ("MyWorkflow" ))
48
+ err := testWorker .RegisterWorkflow (testWorkflow , WithName ("MyWorkflow" ))
49
49
require .NoError (t , err )
50
50
})
51
51
})
@@ -58,7 +58,7 @@ func TestWorkflowRuntime(t *testing.T) {
58
58
t .Run ("with explicit name" , func (t * testing.T ) {
59
59
err := testWorker .RegisterWorkflow (func (ctx * WorkflowContext ) (any , error ) {
60
60
return nil , nil
61
- }, RegisterWithName ("MyWorkflow2" ))
61
+ }, WithName ("MyWorkflow2" ))
62
62
require .NoError (t , err )
63
63
})
64
64
})
@@ -67,7 +67,7 @@ func TestWorkflowRuntime(t *testing.T) {
67
67
require .NoError (t , err )
68
68
69
69
t .Run ("with explicit name" , func (t * testing.T ) {
70
- err := testWorker .RegisterActivity (testActivity , RegisterWithName ("MyActivity" ))
70
+ err := testWorker .RegisterActivity (testActivity , WithName ("MyActivity" ))
71
71
require .NoError (t , err )
72
72
})
73
73
})
@@ -80,7 +80,7 @@ func TestWorkflowRuntime(t *testing.T) {
80
80
t .Run ("with explicit name" , func (t * testing.T ) {
81
81
err := testWorker .RegisterActivity (func (ctx ActivityContext ) (any , error ) {
82
82
return nil , nil
83
- }, RegisterWithName ("MyActivity2" ))
83
+ }, WithName ("MyActivity2" ))
84
84
require .NoError (t , err )
85
85
})
86
86
})
@@ -96,7 +96,7 @@ func TestWorkerOptions(t *testing.T) {
96
96
func TestRegisterOptions (t * testing.T ) {
97
97
t .Run ("with name" , func (t * testing.T ) {
98
98
defaultOpts := registerOptions {}
99
- options , err := processRegisterOptions (defaultOpts , RegisterWithName ("testWorkflow" ))
99
+ options , err := processRegisterOptions (defaultOpts , WithName ("testWorkflow" ))
100
100
require .NoError (t , err )
101
101
assert .NotEmpty (t , options .Name )
102
102
assert .Equal (t , "testWorkflow" , options .Name )
0 commit comments