コード例 #1
0
        public void CsvTable_GetHeader_ByIndex_Success()
        {
            var    table      = new CsvTable();
            string headerName = "test";

            table.AddHeader(headerName);

            CsvHeader returnedHeader = table.GetHeader(0);

            Assert.Equal(headerName, returnedHeader.Name);
            Assert.Equal(0, returnedHeader.Index);
        }
コード例 #2
0
        public void CsvTable_GetHeader_ByIndex_IndexOutOfRange()
        {
            var table = new CsvTable();

            Assert.Throws <IndexOutOfRangeException>(() => table.GetHeader(0));
        }