예제 #1
0
        public void TestConvertBoolArrayInvalid()
        {
            var exception = Assert.Throws <ArgumentException>(() =>
                                                              RTConverters.GetBoolArrayFromString(" [ True, F, 1 ] "));

            Assert.True(exception.Message.Contains("Cannot parse array at index: 2"));
        }
예제 #2
0
        public void TestConvertBoolArrayLastMissingValid(string boolArrayString)
        {
            var expectedBools = new bool?[] { true, false, null };
            var actualBools   = RTConverters.GetBoolArrayFromString(boolArrayString);

            Assert.AreEqual(expectedBools, actualBools);
        }