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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            // Assert
            Assert.AreEqual(lUnkResult, lBolExpectedValue);
        }
Beispiel #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);
        }
Beispiel #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
     }
 }
Beispiel #12
0
 public static string GetLocation()
 {
     return(QsConfig.GetValue <string>("CostCenter"));
 }
Beispiel #13
0
 public static string GetFoodWhsCode()
 {
     return(QsConfig.GetValue <string>("FoodWarehouse"));
 }
Beispiel #14
0
 public static string GetWhsCode()
 {
     return(QsConfig.GetValue <string>("AuctionsWarehouse"));
 }
Beispiel #15
0
 public void KeyNotFound()
 {
     QsConfig.GetValue <string>("NotFoundKey");
 }
Beispiel #16
0
 private string GetCostingCode()
 {
     return(QsConfig.GetValue <string>("CostCenter"));
 }