@@ -1404,8 +1404,7 @@ public class SearchAttributesWorkflow
14041404 Set ( AttrDateTime , new DateTimeOffset ( 2001 , 1 , 1 , 0 , 0 , 0 , TimeSpan . Zero ) ) .
14051405 Set ( AttrDouble , 123.45 ) .
14061406 Set ( AttrKeyword , "SomeKeyword" ) .
1407- // TODO(cretz): Fix after Temporal dev server upgraded
1408- // Set(AttrKeywordList, new[] { "SomeKeyword1", "SomeKeyword2" }).
1407+ Set ( AttrKeywordList , new [ ] { "SomeKeyword1" , "SomeKeyword2" } ) .
14091408 Set ( AttrLong , 678 ) .
14101409 Set ( AttrText , "SomeText" ) .
14111410 ToSearchAttributeCollection ( ) ;
@@ -1424,6 +1423,7 @@ public class SearchAttributesWorkflow
14241423 public static readonly SearchAttributeCollection AttributesFirstUpdated = new SearchAttributeCollection . Builder ( ) .
14251424 Set ( AttrBool , false ) .
14261425 Set ( AttrDateTime , new DateTimeOffset ( 2002 , 1 , 1 , 0 , 0 , 0 , TimeSpan . Zero ) ) .
1426+ Set ( AttrKeywordList , new [ ] { "SomeKeyword1" , "SomeKeyword2" } ) .
14271427 Set ( AttrDouble , 234.56 ) .
14281428 ToSearchAttributeCollection ( ) ;
14291429
@@ -1434,21 +1434,27 @@ public class SearchAttributesWorkflow
14341434 AttrDateTime . ValueUnset ( ) ,
14351435 AttrDouble . ValueUnset ( ) ,
14361436 AttrKeyword . ValueSet ( "AnotherKeyword" ) ,
1437+ AttrKeywordList . ValueSet ( new [ ] { "SomeKeyword3" , "SomeKeyword4" } ) ,
14371438 AttrLong . ValueSet ( 789 ) ,
14381439 AttrText . ValueSet ( "SomeOtherText" ) ,
14391440 } ;
14401441
14411442 public static readonly SearchAttributeCollection AttributesSecondUpdated = new SearchAttributeCollection . Builder ( ) .
14421443 Set ( AttrKeyword , "AnotherKeyword" ) .
1444+ Set ( AttrKeywordList , new [ ] { "SomeKeyword3" , "SomeKeyword4" } ) .
14431445 Set ( AttrLong , 789 ) .
14441446 Set ( AttrText , "SomeOtherText" ) .
14451447 ToSearchAttributeCollection ( ) ;
14461448
14471449 public static void AssertAttributesEqual (
14481450 SearchAttributeCollection expected , SearchAttributeCollection actual ) =>
1451+ // xUnit compares dictionaries using Equals on key and value properly even if they have
1452+ // differing subtypes
14491453 Assert . Equal (
1450- expected . UntypedValues . Where ( kvp => kvp . Key . Name . StartsWith ( "DotNet" ) ) ,
1451- actual . UntypedValues . Where ( kvp => kvp . Key . Name . StartsWith ( "DotNet" ) ) ) ;
1454+ expected . UntypedValues . Where ( kvp => kvp . Key . Name . StartsWith ( "DotNet" ) ) .
1455+ ToDictionary ( kvp => kvp . Key , kvp => kvp . Value ) ,
1456+ actual . UntypedValues . Where ( kvp => kvp . Key . Name . StartsWith ( "DotNet" ) ) .
1457+ ToDictionary ( kvp => kvp . Key , kvp => kvp . Value ) ) ;
14521458
14531459 private bool proceed ;
14541460
0 commit comments