public static void Main(string[] args) { IInitialValue boInitialValue = new InitialValueBO(); string strKey = "Test"; string value1 = boInitialValue.GetValue<string>(strKey); string value2 = boInitialValue.GetValue<string>(strKey); Console.WriteLine("Value 1: {0}, Value 2: {1}", value1, value2); Console.Read(); }
public void TestGetValue_With_Two_Queries() { // Arrange IInitialValue boInitialValue = new InitialValueBO(); string strKey = "Test"; string strValue = "TestResult" + DateTime.Now; boInitialValue.SetValue(strKey, strValue); // Act string strResult1 = boInitialValue.GetValue<string>(strKey); string strResult2 = boInitialValue.GetValue<string>(strKey); // Assert Assert.AreEqual(strValue, strResult1); Assert.AreEqual(strValue, strResult2); }
public void TestGetValue_With_Two_Queries() { // Arrange IInitialValue boInitialValue = new InitialValueBO(); string strKey = "Test"; string strValue = "TestResult" + DateTime.Now; boInitialValue.SetValue(strKey, strValue); // Act string strResult1 = boInitialValue.GetValue <string>(strKey); string strResult2 = boInitialValue.GetValue <string>(strKey); // Assert Assert.AreEqual(strValue, strResult1); Assert.AreEqual(strValue, strResult2); }
public void TestGetValue() { // Arrange IInitialValue boInitialValue = new InitialValueBO(); string strKey = "Test"; string strValue = "TestResult"; boInitialValue.SetValue(strKey, strValue); // Act string strResult = boInitialValue.GetValue<string>(strKey); // Assert Assert.AreEqual(strValue, strResult); }
public void TestGetValue() { // Arrange IInitialValue boInitialValue = new InitialValueBO(); string strKey = "Test"; string strValue = "TestResult"; boInitialValue.SetValue(strKey, strValue); // Act string strResult = boInitialValue.GetValue <string>(strKey); // Assert Assert.AreEqual(strValue, strResult); }