Skip to content
This repository was archived by the owner on May 3, 2024. It is now read-only.

Commit ea29081

Browse files
committed
Fixed StateStore tests
1 parent 25b6fe0 commit ea29081

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

UnitTest/UtilitiesTesting/StateStoreTest.cs

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,21 @@ public TestContext TestContext
2222
[TestMethod]
2323
public void BasicStateStoreTest()
2424
{
25+
const string Key = "TestValue-BASIC";
2526
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");
3738

38-
Assert.AreEqual("TestValue-10", StateStore.Get("TestValue"));
39+
Assert.AreEqual("TestValue-10", StateStore.Get(Key));
3940

4041
Assert.AreEqual(null, StateStore.Get("ThisValueIsNotInTheDictionary"));
4142

@@ -57,6 +58,8 @@ public void StateStoreThreadTesting()
5758
Thread TestThread2 = new Thread(new ParameterizedThreadStart(SetValueForThreadTest));
5859
TestThread1.Start("Test0");
5960
TestThread2.Start("Test1");
61+
TestThread1.Join();
62+
TestThread2.Join();
6063
StateStore.Save();
6164
object Value1 = null;
6265
object Value2 = null;

0 commit comments

Comments
 (0)