File tree Expand file tree Collapse file tree 2 files changed +53
-0
lines changed
src/test/java/org/numenta/nupic Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ package org .numenta .nupic .datagen ;
2+
3+ import static org .junit .Assert .assertEquals ;
4+ import static org .junit .Assert .assertFalse ;
5+ import static org .junit .Assert .assertNotNull ;
6+ import static org .junit .Assert .fail ;
7+
8+ import java .net .URI ;
9+
10+ import org .junit .Test ;
11+
12+
13+ public class ResourceLocatorTest {
14+
15+ @ Test
16+ public void testURICreation () {
17+ try {
18+ ResourceLocator .uri ("." );
19+ fail ();
20+ }catch (Exception e ) {
21+ assertEquals (IllegalStateException .class , e .getClass ());
22+ assertEquals (java .net .MalformedURLException .class , e .getCause ().getClass ());
23+ }
24+
25+ try {
26+ URI uri = ResourceLocator .uri ("file:///." );
27+ assertNotNull (uri );
28+
29+ assertFalse (uri .isOpaque ());
30+ }catch (Exception e ) {
31+ fail ();
32+ }
33+ }
34+
35+ }
Original file line number Diff line number Diff line change 1+ package org .numenta .nupic .util ;
2+
3+ import static org .junit .Assert .*;
4+
5+ import org .junit .Test ;
6+
7+
8+ public class ConditionTest {
9+
10+ @ Test
11+ public void testRqwAdapterReturnsFalse () {
12+ Condition .Adapter <Object > adapter = new Condition .Adapter <>();
13+ assertFalse (adapter .eval (1.0d ));
14+ assertFalse (adapter .eval (1 ));
15+ assertFalse (adapter .eval (new Object ()));
16+ }
17+
18+ }
You can’t perform that action at this time.
0 commit comments