File tree 1 file changed +8
-6
lines changed
tests/Hangfire.Core.Tests/Common
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -149,15 +149,17 @@ public void Ctor_ThrowsAnException_WhenMethodContains_UnassignedGenericTypeParam
149
149
}
150
150
151
151
[ Fact ]
152
- public void Ctor_CorrectlyPasses_ReadOnlyListOfArguments ( )
152
+ public void Ctor_CanUsePropertyValues_OfAnotherJob_AsItsArguments ( )
153
153
{
154
154
var method = _type . GetMethod ( "MethodWithArguments" ) ;
155
- IReadOnlyList < object > args = new List < object > { "hello" , 123 } ;
156
- var job = new Job ( _type , method , args ) ;
155
+ var job = new Job ( _type , method , "hello" , 456 ) ;
157
156
158
- Assert . NotNull ( job ) ;
159
- Assert . Equal ( "hello" , job . Args [ 0 ] ) ;
160
- Assert . Equal ( 123 , job . Args [ 1 ] ) ;
157
+ var anotherJob = new Job ( job . Type , job . Method , job . Args ) ;
158
+
159
+ Assert . Equal ( _type , anotherJob . Type ) ;
160
+ Assert . Equal ( method , anotherJob . Method ) ;
161
+ Assert . Equal ( "hello" , anotherJob . Args [ 0 ] ) ;
162
+ Assert . Equal ( 456 , anotherJob . Args [ 1 ] ) ;
161
163
}
162
164
163
165
[ Fact ]
You can’t perform that action at this time.
0 commit comments