package de.bwaldvogel.liblinear;

import static org.fest.assertions.Assertions.assertThat;

import org.junit.Test;


public class FeatureNodeTest {

    public void testConstructorIndexZero() {
        // since 1.5 there's no more exception here
        new FeatureNode(0, 0);
    }

    @Test(expected = IllegalArgumentException.class)
    public void testConstructorIndexNegative() {
        new FeatureNode(-1, 0);
    }

    public void testConstructorHappy() {
        Feature fn = new FeatureNode(25, 27.39);
        assertThat(fn.getIndex()).isEqualTo(25);
        assertThat(fn.getValue()).isEqualTo(27.39);

        fn = new FeatureNode(1, -0.22222);
        assertThat(fn.getIndex()).isEqualTo(1);
        assertThat(fn.getValue()).isEqualTo(-0.22222);
    }
}

@@ -142,16 +142,26 @@
 Test %7B%0A%0A
+    @Test%0A
     publ
@@ -424,24 +424,34 @@
  0);%0A    %7D%0A%0A
+    @Test%0A
     public v

add missing @Test annotation