View Javadoc
1   /*
2    * CSVeed (https://github.com/42BV/CSVeed)
3    *
4    * Copyright 2013-2023 CSVeed.
5    *
6    * All rights reserved. This program and the accompanying materials
7    * are made available under the terms of The Apache Software License,
8    * Version 2.0 which accompanies this distribution, and is available at
9    * https://www.apache.org/licenses/LICENSE-2.0.txt
10   */
11  package org.csveed.bean;
12  
13  import static org.junit.jupiter.api.Assertions.assertThrows;
14  
15  import org.csveed.report.CsvException;
16  import org.csveed.test.model.BeanSimple;
17  import org.junit.jupiter.api.Test;
18  
19  /**
20   * The Class BeanPropertiesTest.
21   */
22  class BeanPropertiesTest {
23  
24      /**
25       * Map at column index 0.
26       */
27      @Test
28      void mapAtColumnIndex0() {
29          BeanProperties properties = new BeanProperties(BeanSimple.class);
30          assertThrows(CsvException.class, () -> properties.mapIndexToProperty(0, "name"));
31      }
32  }