Skip to content

Commit 6a338fa

Browse files
committed
Add simple test that verifies relations between field type classes
1 parent f0ca4b6 commit 6a338fa

File tree

1 file changed

+21
-0
lines changed
  • x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/dataframe/analyses

1 file changed

+21
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License;
4+
* you may not use this file except in compliance with the Elastic License.
5+
*/
6+
package org.elasticsearch.xpack.core.ml.dataframe.analyses;
7+
8+
import org.elasticsearch.common.util.set.Sets;
9+
import org.elasticsearch.test.ESTestCase;
10+
11+
import static org.hamcrest.Matchers.empty;
12+
13+
public class TypesTests extends ESTestCase {
14+
15+
public void testTypes() {
16+
assertThat(Sets.intersection(Types.bool(), Types.categorical()), empty());
17+
assertThat(Sets.intersection(Types.categorical(), Types.numerical()), empty());
18+
assertThat(Sets.intersection(Types.numerical(), Types.bool()), empty());
19+
assertThat(Sets.difference(Types.discreteNumerical(), Types.numerical()), empty());
20+
}
21+
}

0 commit comments

Comments
 (0)