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

Commit

Permalink
Fixed StateStore tests
Browse files Browse the repository at this point in the history
  • Loading branch information
CaiB committed Feb 13, 2018
1 parent 25b6fe0 commit ea29081
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions UnitTest/UtilitiesTesting/StateStoreTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,21 @@ public TestContext TestContext
[TestMethod]
public void BasicStateStoreTest()
{
const string Key = "TestValue-BASIC";
StateStore.Start("StateStoreTests");
StateStore.Set("TestValue-BASIC", "TestValue-1");
StateStore.Set("TestValue-BASIC", "TestValue-2");
StateStore.Set("TestValue-BASIC", "TestValue-0");
StateStore.Set("TestValue-BASIC", "TestValue-3");
StateStore.Set("TestValue-BASIC", "TestValue-4");
StateStore.Set("TestValue-BASIC", "TestValue-5");
StateStore.Set("TestValue-BASIC", "TestValue-6");
StateStore.Set("TestValue-BASIC", "TestValue-7");
StateStore.Set("TestValue-BASIC", "TestValue-8");
StateStore.Set("TestValue-BASIC", "TestValue-9");
StateStore.Set("TestValue-BASIC", "TestValue-10");
StateStore.Set(Key, "TestValue-1");
StateStore.Set(Key, "TestValue-2");
StateStore.Set(Key, "TestValue-0");
StateStore.Set(Key, "TestValue-3");
StateStore.Set(Key, "TestValue-4");
StateStore.Set(Key, "TestValue-5");
StateStore.Set(Key, "TestValue-6");
StateStore.Set(Key, "TestValue-7");
StateStore.Set(Key, "TestValue-8");
StateStore.Set(Key, "TestValue-9");
StateStore.Set(Key, "TestValue-10");

Assert.AreEqual("TestValue-10", StateStore.Get("TestValue"));
Assert.AreEqual("TestValue-10", StateStore.Get(Key));

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

Expand All @@ -57,6 +58,8 @@ public void StateStoreThreadTesting()
Thread TestThread2 = new Thread(new ParameterizedThreadStart(SetValueForThreadTest));
TestThread1.Start("Test0");
TestThread2.Start("Test1");
TestThread1.Join();
TestThread2.Join();
StateStore.Save();
object Value1 = null;
object Value2 = null;
Expand Down

0 comments on commit ea29081

Please sign in to comment.