Beispiel #1
0
        public void ParseUndefined_StringsList_Null()
        {
            // Act
            var result = (string[])ArrayToSpecifiedListParser.ParseUndefined(new[] { "val1", "val2" }, typeof(string[])) !;

            // Assert

            Assert.IsNull(result);
        }
        public void ParseUndefined_EnumList_ParsedCorrectly()
        {
            // Act
            var result = (IList <TestEnum>)ArrayToSpecifiedListParser.ParseUndefined(new[] { "2", "1" }, typeof(IList <TestEnum>));

            // Assert

            Assert.AreEqual(TestEnum.Value2, result[0]);
            Assert.AreEqual(TestEnum.Value1, result[1]);
        }