예제 #1
0
        public void DoubleValue()
        {
            // Arrange
            double lDblExpectedValue = 1.5;

            // Act
            var lUnkResult = QsConfig.GetValue <double>("double");

            // Assert
            Assert.AreEqual(lUnkResult, lDblExpectedValue);
        }
예제 #2
0
        public void DecimalValue()
        {
            // Arrange
            decimal lDmlExpectedValue = 1.5m;

            // Act
            var lUnkResult = QsConfig.GetValue <decimal>("decimal");

            // Assert
            Assert.AreEqual(lUnkResult, lDmlExpectedValue);
        }
예제 #3
0
        public void LongValue()
        {
            // Arrange
            long lLonExpectedValue = 123456789;

            // Act
            var lUnkResult = QsConfig.GetValue <long>("long");

            // Assert
            Assert.AreEqual(lUnkResult, lLonExpectedValue);
        }
예제 #4
0
        public void FloatValue()
        {
            // Arrange
            float lFltExpectedValue = 1.5f;

            // Act
            var lUnkResult = QsConfig.GetValue <float>("float");

            // Assert
            Assert.AreEqual(lUnkResult, lFltExpectedValue);
        }
예제 #5
0
        public void CharValue()
        {
            // Arrange
            char lChrExpectedValue = 'c';

            // Act
            var lUnkResult = QsConfig.GetValue <char>("char");

            // Assert
            Assert.AreEqual(lUnkResult, lChrExpectedValue);
        }
예제 #6
0
        public void IntValue()
        {
            // Arrange
            int lIntExpectedValue = 1;

            // Act
            var lUnkResult = QsConfig.GetValue <int>("int");

            // Assert
            Assert.AreEqual(lUnkResult, lIntExpectedValue);
        }
예제 #7
0
        public void EnumValue()
        {
            // Arrange
            TestEnum lEnmExpectedValue = TestEnum.ENUM_A;

            // Act
            var lUnkResult = QsConfig.GetValue <TestEnum>("enum");

            // Assert
            Assert.AreEqual(lUnkResult, lEnmExpectedValue);
        }
예제 #8
0
        public void StringValue()
        {
            // Arrange
            string lStrExpectedValue = "string";

            // Act
            var lUnkResult = QsConfig.GetValue <string>("string");

            // Assert
            Assert.AreEqual(lUnkResult, lStrExpectedValue);
        }
예제 #9
0
        public void BooleanValue()
        {
            // Arrange
            bool lBolExpectedValue = true;

            // Act
            var lUnkResult = QsConfig.GetValue <bool>("bool");

            // Assert
            Assert.AreEqual(lUnkResult, lBolExpectedValue);
        }
예제 #10
0
        public void DateValue()
        {
            // Arrange
            DateTime lDtmExpectedValue = new DateTime(2017, 12, 13);

            // Act
            var lUnkResult = QsConfig.GetValue <DateTime>("date");

            // Assert
            Assert.AreEqual(lUnkResult, lDtmExpectedValue);
        }
예제 #11
0
 static QsLog()
 {
     try
     {
         mBolShowConsole  = QsConfig.GetValue <bool>("ShowConsole");
         mBolSaveEventLog = QsConfig.GetValue <bool>("SaveEventLog");
         mBolFullLog      = QsConfig.GetValue <bool>("FullLog");
         mStrLogName      = QsConfig.GetValue <string>("LogName");
         mStrLogPath      = QsConfig.GetValue <string>("LogPath");
     }
     catch
     {
         //Ignore exceptions
     }
 }
예제 #12
0
 public static string GetLocation()
 {
     return(QsConfig.GetValue <string>("CostCenter"));
 }
예제 #13
0
 public static string GetFoodWhsCode()
 {
     return(QsConfig.GetValue <string>("FoodWarehouse"));
 }
예제 #14
0
 public static string GetWhsCode()
 {
     return(QsConfig.GetValue <string>("AuctionsWarehouse"));
 }
예제 #15
0
 public void KeyNotFound()
 {
     QsConfig.GetValue <string>("NotFoundKey");
 }
예제 #16
0
 private string GetCostingCode()
 {
     return(QsConfig.GetValue <string>("CostCenter"));
 }