
com.aliasi.test.unit.stats.BernoulliConstantTest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aliasi-lingpipe Show documentation
Show all versions of aliasi-lingpipe Show documentation
This is the original Lingpipe:
http://alias-i.com/lingpipe/web/download.html
There were not made any changes to the source code.
The newest version!
package com.aliasi.test.unit.stats;
import com.aliasi.stats.BernoulliConstant;
import org.junit.Test;
import static junit.framework.Assert.assertTrue;
import static junit.framework.Assert.fail;
import java.io.*;
public class BernoulliConstantTest {
@Test
public void testOne() throws IOException, ClassNotFoundException {
BernoulliConstant coin = new BernoulliConstant(0.5);
BernoulliEstimatorTest.assertFairCoin(coin);
try {
new BernoulliConstant(1.2);
fail();
} catch (IllegalArgumentException e) {
assertTrue(true);
}
try {
new BernoulliConstant(-1.2);
fail();
} catch (IllegalArgumentException e) {
assertTrue(true);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy