@@ -22,20 +22,21 @@ public TestContext TestContext
22
22
[ TestMethod ]
23
23
public void BasicStateStoreTest ( )
24
24
{
25
+ const string Key = "TestValue-BASIC" ;
25
26
StateStore . Start ( "StateStoreTests" ) ;
26
- StateStore . Set ( "TestValue-BASIC" , "TestValue-1" ) ;
27
- StateStore . Set ( "TestValue-BASIC" , "TestValue-2" ) ;
28
- StateStore . Set ( "TestValue-BASIC" , "TestValue-0" ) ;
29
- StateStore . Set ( "TestValue-BASIC" , "TestValue-3" ) ;
30
- StateStore . Set ( "TestValue-BASIC" , "TestValue-4" ) ;
31
- StateStore . Set ( "TestValue-BASIC" , "TestValue-5" ) ;
32
- StateStore . Set ( "TestValue-BASIC" , "TestValue-6" ) ;
33
- StateStore . Set ( "TestValue-BASIC" , "TestValue-7" ) ;
34
- StateStore . Set ( "TestValue-BASIC" , "TestValue-8" ) ;
35
- StateStore . Set ( "TestValue-BASIC" , "TestValue-9" ) ;
36
- StateStore . Set ( "TestValue-BASIC" , "TestValue-10" ) ;
27
+ StateStore . Set ( Key , "TestValue-1" ) ;
28
+ StateStore . Set ( Key , "TestValue-2" ) ;
29
+ StateStore . Set ( Key , "TestValue-0" ) ;
30
+ StateStore . Set ( Key , "TestValue-3" ) ;
31
+ StateStore . Set ( Key , "TestValue-4" ) ;
32
+ StateStore . Set ( Key , "TestValue-5" ) ;
33
+ StateStore . Set ( Key , "TestValue-6" ) ;
34
+ StateStore . Set ( Key , "TestValue-7" ) ;
35
+ StateStore . Set ( Key , "TestValue-8" ) ;
36
+ StateStore . Set ( Key , "TestValue-9" ) ;
37
+ StateStore . Set ( Key , "TestValue-10" ) ;
37
38
38
- Assert . AreEqual ( "TestValue-10" , StateStore . Get ( "TestValue" ) ) ;
39
+ Assert . AreEqual ( "TestValue-10" , StateStore . Get ( Key ) ) ;
39
40
40
41
Assert . AreEqual ( null , StateStore . Get ( "ThisValueIsNotInTheDictionary" ) ) ;
41
42
@@ -57,6 +58,8 @@ public void StateStoreThreadTesting()
57
58
Thread TestThread2 = new Thread ( new ParameterizedThreadStart ( SetValueForThreadTest ) ) ;
58
59
TestThread1 . Start ( "Test0" ) ;
59
60
TestThread2 . Start ( "Test1" ) ;
61
+ TestThread1 . Join ( ) ;
62
+ TestThread2 . Join ( ) ;
60
63
StateStore . Save ( ) ;
61
64
object Value1 = null ;
62
65
object Value2 = null ;
0 commit comments