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

            Assert.Throws <ApplicationException>(() => bom.ToCSV());
        }
Beispiel #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());
        }
Beispiel #3
0
 private static string[] BomToCsvLines(ExtractedBOM bom)
 {
     return(bom
            .ToCSV()
            .Split("\r\n".ToCharArray(), StringSplitOptions.RemoveEmptyEntries));
 }
Beispiel #4
0
        public void EmptyBom()
        {
            var bom = new ExtractedBOM();

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