Esempio n. 1
0
        public void GetIntSetting()
        {
            var expected = SettingResponse <int> .Create(true, 4);

            var actual = Int.TryGetIntSetting();

            Assert.AreEqual(expected, actual);
        }
Esempio n. 2
0
        public void GetLongSetting()
        {
            var expected = SettingResponse <long> .Create(true, 5L);

            var actual = Long.TryGetLongSetting();

            Assert.AreEqual(expected, actual);
        }
Esempio n. 3
0
        public void GetDoubleSetting()
        {
            var expected = SettingResponse <double> .Create(true, 2.9D);

            var actual = Double.TryGetDoubleSetting();

            Assert.AreEqual(expected, actual);
        }
Esempio n. 4
0
        public void GetFloatSetting()
        {
            var expected = SettingResponse <float> .Create(true, 3.9F);

            var actual = Float.TryGetFloatSetting();

            Assert.AreEqual(expected, actual);
        }
Esempio n. 5
0
        public void GetCharSetting()
        {
            var expected = SettingResponse <char> .Create(true, 'a');

            var actual = Char.TryGetCharSetting();

            Assert.AreEqual(expected, actual);
        }
Esempio n. 6
0
        public void GetDecimalSetting()
        {
            var expected = SettingResponse <decimal> .Create(true, 1.9M);

            var actual = Decimal.TryGetDecimalSetting();

            Assert.AreEqual(expected, actual);
        }
Esempio n. 7
0
        public void NotParseInvalidObject()
        {
            var expected = SettingResponse <Sample> .Create(Char.ValueNotParsed());

            var actual = Char.TryGetObjectSetting <Sample>();

            Assert.AreEqual(expected.ToString(), actual.ToString());
        }
Esempio n. 8
0
        public void GetByteSetting()
        {
            var expected = SettingResponse <byte> .Create(true, 0123);

            var actual = Byte.TryGetByteSetting();

            Assert.AreEqual(expected, actual);
        }
Esempio n. 9
0
        public void NotParseInvalidValue()
        {
            var expected = SettingResponse <bool> .Create(Char.ValueNotParsed());

            var actual = Char.TryGetBoolSetting();

            Assert.AreEqual(expected, actual);
        }
Esempio n. 10
0
        public void NotFindInvalidKey()
        {
            var expected = SettingResponse <ushort> .Create(NotFound.DoesNotExist());

            var actual = NotFound.TryGetUShortSetting();

            Assert.AreEqual(expected, actual);
        }
Esempio n. 11
0
        public void GetUShortSetting()
        {
            var expected = SettingResponse <ushort> .Create(true, 9);

            var actual = UShort.TryGetUShortSetting();

            Assert.AreEqual(expected, actual);
        }
Esempio n. 12
0
        public void GetStringSetting()
        {
            var expected = SettingResponse <string> .Create(true, "test");

            var actual = String.TryGetStringSetting();

            Assert.AreEqual(expected, actual);
        }
Esempio n. 13
0
        public void GetBoolSetting()
        {
            var expected = SettingResponse <bool> .Create(true, true);

            var actual = Boolean.TryGetBoolSetting();

            Assert.AreEqual(expected, actual);
        }
Esempio n. 14
0
        public void GetObjectSetting()
        {
            var sample = new Sample {
                Number = 10, Text = "Awesome"
            };
            var expected = SettingResponse <Sample> .Create(true, sample);

            var actual = Object.TryGetObjectSetting <Sample>();

            Assert.AreEqual(expected, actual);
        }