コード例 #1
0
        public void DataOnly()
        {
            var bom = new ExtractedBOM
            {
                Data = new []
                {
                    new object[] { "foo" }
                }
            };

            Assert.Throws <ApplicationException>(() => bom.ToCSV());
        }
コード例 #2
0
        public void DifferentNumberOfColumnAndData()
        {
            var bom = new ExtractedBOM
            {
                Columns = new [] { new Column {
                                       Label = "a"
                                   }, new Column {
                                       Label = "b"
                                   } },
                Data = new []
                {
                    new object[] { "foo" }
                }
            };

            Assert.Throws <ApplicationException>(() => bom.ToCSV());
        }
コード例 #3
0
 private static string[] BomToCsvLines(ExtractedBOM bom)
 {
     return(bom
            .ToCSV()
            .Split("\r\n".ToCharArray(), StringSplitOptions.RemoveEmptyEntries));
 }
コード例 #4
0
        public void EmptyBom()
        {
            var bom = new ExtractedBOM();

            Assert.Throws <ApplicationException>(() => bom.ToCSV());
        }