Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
        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);
        }