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.common;
12
13 import static org.junit.jupiter.api.Assertions.assertEquals;
14
15 import org.junit.jupiter.api.Test;
16
17 /**
18 * The Class ColumnKeyTest.
19 */
20 class ColumnKeyTest {
21
22 /**
23 * Column name key equals.
24 */
25 @Test
26 void columnNameKeyEquals() {
27 ColumnNameKey key1 = new ColumnNameKey("alpha");
28 ColumnNameKey key2 = new ColumnNameKey("alpha");
29 assertEquals(key1, key2);
30 }
31
32 /**
33 * Key 1 less than key 2.
34 */
35 @Test
36 void key1LessThanKey2() {
37 ColumnNameKey key1 = new ColumnNameKey("alpha");
38 ColumnNameKey key2 = new ColumnNameKey("beta");
39 assertEquals(-1, key1.compareTo(key2));
40 }
41
42 }