target stringlengths 20 113k | src_fm stringlengths 11 86.3k | src_fm_fc stringlengths 21 86.4k | src_fm_fc_co stringlengths 30 86.4k | src_fm_fc_ms stringlengths 42 86.8k | src_fm_fc_ms_ff stringlengths 43 86.8k |
|---|---|---|---|---|---|
@Test public void testExponentialMinusOne() { assertEq(22025.46579480, expm1(10.0)); assertEq(22025.46579480f, expm1(10.0f)); } | public static double expm1(double x) { return Math.expm1(x); } | ArrayMath { public static double expm1(double x) { return Math.expm1(x); } } | ArrayMath { public static double expm1(double x) { return Math.expm1(x); } private ArrayMath(); } | ArrayMath { public static double expm1(double x) { return Math.expm1(x); } private ArrayMath(); static float sin(float x); static double sin(double x); static float cos(float x); static double cos(double x); static float tan(float x); static double tan(double x); static float asin(float x); static double asin(double x... | ArrayMath { public static double expm1(double x) { return Math.expm1(x); } private ArrayMath(); static float sin(float x); static double sin(double x); static float cos(float x); static double cos(double x); static float tan(float x); static double tan(double x); static float asin(float x); static double asin(double x... |
@Test public void testLnPlusOne() { assertEq(2.39789527279837 , log1p(10.0 )); assertEq(2.39789527279837f, log1p(10.0f)); } | public static double log1p(double x) { return Math.log1p(x); } | ArrayMath { public static double log1p(double x) { return Math.log1p(x); } } | ArrayMath { public static double log1p(double x) { return Math.log1p(x); } private ArrayMath(); } | ArrayMath { public static double log1p(double x) { return Math.log1p(x); } private ArrayMath(); static float sin(float x); static double sin(double x); static float cos(float x); static double cos(double x); static float tan(float x); static double tan(double x); static float asin(float x); static double asin(double x... | ArrayMath { public static double log1p(double x) { return Math.log1p(x); } private ArrayMath(); static float sin(float x); static double sin(double x); static float cos(float x); static double cos(double x); static float tan(float x); static double tan(double x); static float asin(float x); static double asin(double x... |
@Test public void testLog10() { float fi = 1.0f; double di = 1.0; for (int i=1; i<=10; ++i) { fi *= 10.0f; di *= 10.0; assertEq((float)i, log10(fi)); assertEq((double)i, log10(di)); } } | public static float log10(float x) { return (float)Math.log10(x); } | ArrayMath { public static float log10(float x) { return (float)Math.log10(x); } } | ArrayMath { public static float log10(float x) { return (float)Math.log10(x); } private ArrayMath(); } | ArrayMath { public static float log10(float x) { return (float)Math.log10(x); } private ArrayMath(); static float sin(float x); static double sin(double x); static float cos(float x); static double cos(double x); static float tan(float x); static double tan(double x); static float asin(float x); static double asin(dou... | ArrayMath { public static float log10(float x) { return (float)Math.log10(x); } private ArrayMath(); static float sin(float x); static double sin(double x); static float cos(float x); static double cos(double x); static float tan(float x); static double tan(double x); static float asin(float x); static double asin(dou... |
@Test public void testUlp() { assertEq(FLT_EPSILON, ulp(1.2345f)); assertEq(DBL_EPSILON, ulp(1.2345)); } | public static double ulp(double d) { return Math.ulp(d); } | ArrayMath { public static double ulp(double d) { return Math.ulp(d); } } | ArrayMath { public static double ulp(double d) { return Math.ulp(d); } private ArrayMath(); } | ArrayMath { public static double ulp(double d) { return Math.ulp(d); } private ArrayMath(); static float sin(float x); static double sin(double x); static float cos(float x); static double cos(double x); static float tan(float x); static double tan(double x); static float asin(float x); static double asin(double x); s... | ArrayMath { public static double ulp(double d) { return Math.ulp(d); } private ArrayMath(); static float sin(float x); static double sin(double x); static float cos(float x); static double cos(double x); static float tan(float x); static double tan(double x); static float asin(float x); static double asin(double x); s... |
@Test public void testIEEERemainder() { assertEq(-1.0d, IEEEremainder(3.0d,2.0d)); assertEq(-1.0f, IEEEremainder(3.0f,2.0f)); } | public static double IEEEremainder(double f1, double f2) { return Math.IEEEremainder(f1,f2); } | ArrayMath { public static double IEEEremainder(double f1, double f2) { return Math.IEEEremainder(f1,f2); } } | ArrayMath { public static double IEEEremainder(double f1, double f2) { return Math.IEEEremainder(f1,f2); } private ArrayMath(); } | ArrayMath { public static double IEEEremainder(double f1, double f2) { return Math.IEEEremainder(f1,f2); } private ArrayMath(); static float sin(float x); static double sin(double x); static float cos(float x); static double cos(double x); static float tan(float x); static double tan(double x); static float asin(float... | ArrayMath { public static double IEEEremainder(double f1, double f2) { return Math.IEEEremainder(f1,f2); } private ArrayMath(); static float sin(float x); static double sin(double x); static float cos(float x); static double cos(double x); static float tan(float x); static double tan(double x); static float asin(float... |
@Test public void testRampBytes() { int n1 = 7; int n2 = 5; int n3 = 3; byte f = (byte)0; byte r1 = (byte)1; byte r2 = (byte)2; byte[] arr1 = rampbyte(f,r1,n3); byte[][] arr2 = rampbyte(f,r1,r2,n3,n2); byte[][][] arr3 = rampbyte(f,r1,r2,r1,n3,n2,n1); for (int i3=0; i3<n3; ++i3) { for (int i2=0; i2<n2; ++i2) { for (int ... | public static byte[] rampbyte(byte ra, byte rb1, int n1) { byte[] rx = new byte[n1]; ramp(ra,rb1,rx); return rx; } | ArrayMath { public static byte[] rampbyte(byte ra, byte rb1, int n1) { byte[] rx = new byte[n1]; ramp(ra,rb1,rx); return rx; } } | ArrayMath { public static byte[] rampbyte(byte ra, byte rb1, int n1) { byte[] rx = new byte[n1]; ramp(ra,rb1,rx); return rx; } private ArrayMath(); } | ArrayMath { public static byte[] rampbyte(byte ra, byte rb1, int n1) { byte[] rx = new byte[n1]; ramp(ra,rb1,rx); return rx; } private ArrayMath(); static float sin(float x); static double sin(double x); static float cos(float x); static double cos(double x); static float tan(float x); static double tan(double x); sta... | ArrayMath { public static byte[] rampbyte(byte ra, byte rb1, int n1) { byte[] rx = new byte[n1]; ramp(ra,rb1,rx); return rx; } private ArrayMath(); static float sin(float x); static double sin(double x); static float cos(float x); static double cos(double x); static float tan(float x); static double tan(double x); sta... |
@Test(expectedExceptions = ArgsParser.OptionException.class) public void testIntConverterShouldThrowException() throws Exception { ArgsParser.toInt("1986"); ArgsParser.toInt("Foo"); } | public static int toInt(String s) throws OptionException { try { return Integer.parseInt(s); } catch (NumberFormatException e) { throw new OptionException("the value "+s+" is not a valid int"); } } | ArgsParser { public static int toInt(String s) throws OptionException { try { return Integer.parseInt(s); } catch (NumberFormatException e) { throw new OptionException("the value "+s+" is not a valid int"); } } } | ArgsParser { public static int toInt(String s) throws OptionException { try { return Integer.parseInt(s); } catch (NumberFormatException e) { throw new OptionException("the value "+s+" is not a valid int"); } } ArgsParser(String[] args, String shortOpts); ArgsParser(String[] args, String shortOpts, String[] longOpts);... | ArgsParser { public static int toInt(String s) throws OptionException { try { return Integer.parseInt(s); } catch (NumberFormatException e) { throw new OptionException("the value "+s+" is not a valid int"); } } ArgsParser(String[] args, String shortOpts); ArgsParser(String[] args, String shortOpts, String[] longOpts);... | ArgsParser { public static int toInt(String s) throws OptionException { try { return Integer.parseInt(s); } catch (NumberFormatException e) { throw new OptionException("the value "+s+" is not a valid int"); } } ArgsParser(String[] args, String shortOpts); ArgsParser(String[] args, String shortOpts, String[] longOpts);... |
@Test public void testRampShorts() { int n1 = 7; int n2 = 5; int n3 = 3; short f = 0; short r1 = 1; short r2 = 2; short[] arr1 = rampshort(f,r1,n3); short[][] arr2 = rampshort(f,r1,r2,n3,n2); short[][][] arr3 = rampshort(f,r1,r2,r1,n3,n2,n1); for (int i3=0; i3<n3; ++i3) { for (int i2 = 0; i2 < n2; ++i2) { for (int i1 =... | public static short[] rampshort(short ra, short rb1, int n1) { short[] rx = new short[n1]; ramp(ra,rb1,rx); return rx; } | ArrayMath { public static short[] rampshort(short ra, short rb1, int n1) { short[] rx = new short[n1]; ramp(ra,rb1,rx); return rx; } } | ArrayMath { public static short[] rampshort(short ra, short rb1, int n1) { short[] rx = new short[n1]; ramp(ra,rb1,rx); return rx; } private ArrayMath(); } | ArrayMath { public static short[] rampshort(short ra, short rb1, int n1) { short[] rx = new short[n1]; ramp(ra,rb1,rx); return rx; } private ArrayMath(); static float sin(float x); static double sin(double x); static float cos(float x); static double cos(double x); static float tan(float x); static double tan(double x... | ArrayMath { public static short[] rampshort(short ra, short rb1, int n1) { short[] rx = new short[n1]; ramp(ra,rb1,rx); return rx; } private ArrayMath(); static float sin(float x); static double sin(double x); static float cos(float x); static double cos(double x); static float tan(float x); static double tan(double x... |
@Test public void testRampInts() { int n1 = 7; int n2 = 5; int n3 = 3; int f = 0; int r1 = 1; int r2 = 2; int[] arr1 = rampint(f,r1,n3); int[][] arr2 = rampint(f,r1,r2,n3,n2); int[][][] arr3 = rampint(f,r1,r2,r1,n3,n2,n1); for (int i3=0; i3<n3; ++i3) { for (int i2=0; i2<n2; ++i2) { for (int i1=0; i1<n1; ++i1) { assertE... | public static int[] rampint(int ra, int rb1, int n1) { int[] rx = new int[n1]; ramp(ra,rb1,rx); return rx; } | ArrayMath { public static int[] rampint(int ra, int rb1, int n1) { int[] rx = new int[n1]; ramp(ra,rb1,rx); return rx; } } | ArrayMath { public static int[] rampint(int ra, int rb1, int n1) { int[] rx = new int[n1]; ramp(ra,rb1,rx); return rx; } private ArrayMath(); } | ArrayMath { public static int[] rampint(int ra, int rb1, int n1) { int[] rx = new int[n1]; ramp(ra,rb1,rx); return rx; } private ArrayMath(); static float sin(float x); static double sin(double x); static float cos(float x); static double cos(double x); static float tan(float x); static double tan(double x); static fl... | ArrayMath { public static int[] rampint(int ra, int rb1, int n1) { int[] rx = new int[n1]; ramp(ra,rb1,rx); return rx; } private ArrayMath(); static float sin(float x); static double sin(double x); static float cos(float x); static double cos(double x); static float tan(float x); static double tan(double x); static fl... |
@Test public void testRampLongs() { int n1 = 7; int n2 = 5; int n3 = 3; long f = 0L; long r1 = 1L; long r2 = 2L; long[] arr1 = ramplong(f,r1,n3); long[][] arr2 = ramplong(f,r1,r2,n3,n2); long[][][] arr3 = ramplong(f,r1,r2,r1,n3,n2,n1); for (int i3=0; i3<n3; ++i3) { for (int i2=0; i2<n2; ++i2) { for (int i1=0; i1<n1; ++... | public static long[] ramplong(long ra, long rb1, int n1) { long[] rx = new long[n1]; ramp(ra,rb1,rx); return rx; } | ArrayMath { public static long[] ramplong(long ra, long rb1, int n1) { long[] rx = new long[n1]; ramp(ra,rb1,rx); return rx; } } | ArrayMath { public static long[] ramplong(long ra, long rb1, int n1) { long[] rx = new long[n1]; ramp(ra,rb1,rx); return rx; } private ArrayMath(); } | ArrayMath { public static long[] ramplong(long ra, long rb1, int n1) { long[] rx = new long[n1]; ramp(ra,rb1,rx); return rx; } private ArrayMath(); static float sin(float x); static double sin(double x); static float cos(float x); static double cos(double x); static float tan(float x); static double tan(double x); sta... | ArrayMath { public static long[] ramplong(long ra, long rb1, int n1) { long[] rx = new long[n1]; ramp(ra,rb1,rx); return rx; } private ArrayMath(); static float sin(float x); static double sin(double x); static float cos(float x); static double cos(double x); static float tan(float x); static double tan(double x); sta... |
@Test public void testRampDoubles() { int n1 = 7; int n2 = 5; int n3 = 3; double f = 0.0d; double r1 = 1.0d; double r2 = 2.0d; double[] arr1 = rampdouble(f,r1,n3); double[][] arr2 = rampdouble(f,r1,r2,n3,n2); double[][][] arr3 = rampdouble(f,r1,r2,r1,n3,n2,n1); for (int i3=0; i3<n3; ++i3) { for (int i2=0; i2<n2; ++i2) ... | public static double[] rampdouble(double ra, double rb1, int n1) { double[] rx = new double[n1]; ramp(ra,rb1,rx); return rx; } | ArrayMath { public static double[] rampdouble(double ra, double rb1, int n1) { double[] rx = new double[n1]; ramp(ra,rb1,rx); return rx; } } | ArrayMath { public static double[] rampdouble(double ra, double rb1, int n1) { double[] rx = new double[n1]; ramp(ra,rb1,rx); return rx; } private ArrayMath(); } | ArrayMath { public static double[] rampdouble(double ra, double rb1, int n1) { double[] rx = new double[n1]; ramp(ra,rb1,rx); return rx; } private ArrayMath(); static float sin(float x); static double sin(double x); static float cos(float x); static double cos(double x); static float tan(float x); static double tan(do... | ArrayMath { public static double[] rampdouble(double ra, double rb1, int n1) { double[] rx = new double[n1]; ramp(ra,rb1,rx); return rx; } private ArrayMath(); static float sin(float x); static double sin(double x); static float cos(float x); static double cos(double x); static float tan(float x); static double tan(do... |
@Test public void testSimple() { BrentMinFinder bmf = new BrentMinFinder(new BrentMinFinder.Function() { public double evaluate(double x) { return x*(x*x-2.0)-5.0; } }); double xmin = bmf.findMin(0.0,1.0,1.0e-5); trace("xmin="+xmin); assertEquals(0.81650,xmin,0.00001); } | public double findMin(double a, double b, double tol) { double x = a+GSI*(b-a); double v = x; double w = x; double fx = f(x); double fv = fx; double fw = fx; double d = 0.0; double e = 0.0; for (double xm = 0.5*(a+b), tol1 = EPS*abs(x)+tol/3.0, tol2 = 2.0*tol1; abs(x-xm) > tol2-0.5*(b-a); xm = 0.5*(a+b), tol1 = EPS*abs... | BrentMinFinder { public double findMin(double a, double b, double tol) { double x = a+GSI*(b-a); double v = x; double w = x; double fx = f(x); double fv = fx; double fw = fx; double d = 0.0; double e = 0.0; for (double xm = 0.5*(a+b), tol1 = EPS*abs(x)+tol/3.0, tol2 = 2.0*tol1; abs(x-xm) > tol2-0.5*(b-a); xm = 0.5*(a+b... | BrentMinFinder { public double findMin(double a, double b, double tol) { double x = a+GSI*(b-a); double v = x; double w = x; double fx = f(x); double fv = fx; double fw = fx; double d = 0.0; double e = 0.0; for (double xm = 0.5*(a+b), tol1 = EPS*abs(x)+tol/3.0, tol2 = 2.0*tol1; abs(x-xm) > tol2-0.5*(b-a); xm = 0.5*(a+b... | BrentMinFinder { public double findMin(double a, double b, double tol) { double x = a+GSI*(b-a); double v = x; double w = x; double fx = f(x); double fv = fx; double fw = fx; double d = 0.0; double e = 0.0; for (double xm = 0.5*(a+b), tol1 = EPS*abs(x)+tol/3.0, tol2 = 2.0*tol1; abs(x-xm) > tol2-0.5*(b-a); xm = 0.5*(a+b... | BrentMinFinder { public double findMin(double a, double b, double tol) { double x = a+GSI*(b-a); double v = x; double w = x; double fx = f(x); double fv = fx; double fw = fx; double d = 0.0; double e = 0.0; for (double xm = 0.5*(a+b), tol1 = EPS*abs(x)+tol/3.0, tol2 = 2.0*tol1; abs(x-xm) > tol2-0.5*(b-a); xm = 0.5*(a+b... |
@Test public void testMinFinder() { MinFunc1 f1 = new MinFunc1(); f1.findMin(0.0,1.0); MinFunc2 f2 = new MinFunc2(); f2.findMin(2.0,3.0); MinFunc3 f3 = new MinFunc3(); f3.findMin(-1.0,3.0); MinFunc4 f4 = new MinFunc4(); f4.findMin(-1.0,3.0); } | public double findMin(double a, double b, double tol) { double x = a+GSI*(b-a); double v = x; double w = x; double fx = f(x); double fv = fx; double fw = fx; double d = 0.0; double e = 0.0; for (double xm = 0.5*(a+b), tol1 = EPS*abs(x)+tol/3.0, tol2 = 2.0*tol1; abs(x-xm) > tol2-0.5*(b-a); xm = 0.5*(a+b), tol1 = EPS*abs... | BrentMinFinder { public double findMin(double a, double b, double tol) { double x = a+GSI*(b-a); double v = x; double w = x; double fx = f(x); double fv = fx; double fw = fx; double d = 0.0; double e = 0.0; for (double xm = 0.5*(a+b), tol1 = EPS*abs(x)+tol/3.0, tol2 = 2.0*tol1; abs(x-xm) > tol2-0.5*(b-a); xm = 0.5*(a+b... | BrentMinFinder { public double findMin(double a, double b, double tol) { double x = a+GSI*(b-a); double v = x; double w = x; double fx = f(x); double fv = fx; double fw = fx; double d = 0.0; double e = 0.0; for (double xm = 0.5*(a+b), tol1 = EPS*abs(x)+tol/3.0, tol2 = 2.0*tol1; abs(x-xm) > tol2-0.5*(b-a); xm = 0.5*(a+b... | BrentMinFinder { public double findMin(double a, double b, double tol) { double x = a+GSI*(b-a); double v = x; double w = x; double fx = f(x); double fv = fx; double fw = fx; double d = 0.0; double e = 0.0; for (double xm = 0.5*(a+b), tol1 = EPS*abs(x)+tol/3.0, tol2 = 2.0*tol1; abs(x-xm) > tol2-0.5*(b-a); xm = 0.5*(a+b... | BrentMinFinder { public double findMin(double a, double b, double tol) { double x = a+GSI*(b-a); double v = x; double w = x; double fx = f(x); double fv = fx; double fw = fx; double d = 0.0; double e = 0.0; for (double xm = 0.5*(a+b), tol1 = EPS*abs(x)+tol/3.0, tol2 = 2.0*tol1; abs(x-xm) > tol2-0.5*(b-a); xm = 0.5*(a+b... |
@Test public void testLinearObjFunc() throws Exception { final double answer = 1./3.; final int[] calls = new int[]{0}; ScalarSolver solver = new ScalarSolver(new Function() { public double function(double scalar) { ++calls[0]; return Math.abs(scalar - answer); } }); double xmin = solver.solve(0., 1., 0.001, 0.001, 20,... | public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final double[] xs = {0.... | ScalarSolver { public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final do... | ScalarSolver { public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final do... | ScalarSolver { public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final do... | ScalarSolver { public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final do... |
@Test public void testNonUnitScalarRange() throws Exception { final double answer = 1./3.; final int[] calls = new int[]{0}; ScalarSolver solver = new ScalarSolver(new Function() { public double function(double scalar) { ++calls[0]; return Math.abs(scalar - answer); } }); double xmin = solver.solve(-1., 2., 0.001, 0.00... | public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final double[] xs = {0.... | ScalarSolver { public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final do... | ScalarSolver { public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final do... | ScalarSolver { public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final do... | ScalarSolver { public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final do... |
@Test public void testRightHandSide() throws Exception { final double answer = 0.03; final int[] calls = new int[]{0}; ScalarSolver solver = new ScalarSolver(new Function() { public double function(double scalar) { ++calls[0]; return Math.abs(scalar - answer); } }); double xmin = solver.solve(0., 1., 0.001, 0.001, 20, ... | public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final double[] xs = {0.... | ScalarSolver { public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final do... | ScalarSolver { public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final do... | ScalarSolver { public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final do... | ScalarSolver { public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final do... |
@Test public void testLeftHandSide2() throws Exception { final double answer = 0.98; final int[] calls = new int[]{0}; ScalarSolver solver = new ScalarSolver(new Function() { public double function(double scalar) { ++calls[0]; return Math.abs(scalar - answer); } }); double xmin = solver.solve(0., 1., 0.001, 0.001, 20, ... | public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final double[] xs = {0.... | ScalarSolver { public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final do... | ScalarSolver { public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final do... | ScalarSolver { public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final do... | ScalarSolver { public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final do... |
@Test(expectedExceptions = ArgsParser.OptionException.class) public void testLongConverterShouldThrowException() throws Exception { ArgsParser.toLong("1986"); ArgsParser.toLong("Foo"); } | public static long toLong(String s) throws OptionException { try { return Long.parseLong(s); } catch (NumberFormatException e) { throw new OptionException("the value "+s+" is not a valid long"); } } | ArgsParser { public static long toLong(String s) throws OptionException { try { return Long.parseLong(s); } catch (NumberFormatException e) { throw new OptionException("the value "+s+" is not a valid long"); } } } | ArgsParser { public static long toLong(String s) throws OptionException { try { return Long.parseLong(s); } catch (NumberFormatException e) { throw new OptionException("the value "+s+" is not a valid long"); } } ArgsParser(String[] args, String shortOpts); ArgsParser(String[] args, String shortOpts, String[] longOpts)... | ArgsParser { public static long toLong(String s) throws OptionException { try { return Long.parseLong(s); } catch (NumberFormatException e) { throw new OptionException("the value "+s+" is not a valid long"); } } ArgsParser(String[] args, String shortOpts); ArgsParser(String[] args, String shortOpts, String[] longOpts)... | ArgsParser { public static long toLong(String s) throws OptionException { try { return Long.parseLong(s); } catch (NumberFormatException e) { throw new OptionException("the value "+s+" is not a valid long"); } } ArgsParser(String[] args, String shortOpts); ArgsParser(String[] args, String shortOpts, String[] longOpts)... |
@Test public void testParabola() throws Exception { final double answer = 1./3.; final int[] calls = new int[]{0}; ScalarSolver solver = new ScalarSolver(new Function() { public double function(double scalar) { ++calls[0]; return (scalar - answer)*(scalar - answer); } }); double xmin = solver.solve(0., 1., 0.001, 0.001... | public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final double[] xs = {0.... | ScalarSolver { public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final do... | ScalarSolver { public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final do... | ScalarSolver { public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final do... | ScalarSolver { public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final do... |
@Test public void testPositiveCurvature() throws Exception { final double answer = 1./3.; final int[] calls = new int[]{0}; ScalarSolver solver = new ScalarSolver(new Function() { public double function(double scalar) { ++calls[0]; return Math.sqrt(Math.abs(scalar - answer)); } }); double xmin = solver.solve(0., 1., 0.... | public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final double[] xs = {0.... | ScalarSolver { public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final do... | ScalarSolver { public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final do... | ScalarSolver { public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final do... | ScalarSolver { public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final do... |
@Test public void testStepFunction() throws Exception { final double answer = 1./3.; final int[] calls = new int[]{0}; ScalarSolver solver = new ScalarSolver(new Function() { public double function(double scalar) { ++calls[0]; if (scalar < answer) return 3.; return scalar - answer; } }); double xmin = solver.solve(0., ... | public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final double[] xs = {0.... | ScalarSolver { public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final do... | ScalarSolver { public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final do... | ScalarSolver { public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final do... | ScalarSolver { public double solve(final double scalarMin, final double scalarMax, final double okError, final double okFraction, final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); int nter = numberIterations; if (nter < 6) { nter = 6; } final do... |
@Test public void testForsythe() { ZeroFunc1 f1 = new ZeroFunc1(); f1.findZero(2.0,3.0); ZeroFunc2 f2 = new ZeroFunc2(); f2.findZero(-1.0,3.0); ZeroFunc3 f3 = new ZeroFunc3(); f3.findZero(-1.0,3.0); } | public double findZero(double a, double b, double tol) { double fa = _f.evaluate(a); double fb = _f.evaluate(b); return findZero(a,fa,b,fb,tol); } | BrentZeroFinder { public double findZero(double a, double b, double tol) { double fa = _f.evaluate(a); double fb = _f.evaluate(b); return findZero(a,fa,b,fb,tol); } } | BrentZeroFinder { public double findZero(double a, double b, double tol) { double fa = _f.evaluate(a); double fb = _f.evaluate(b); return findZero(a,fa,b,fb,tol); } BrentZeroFinder(Function f); } | BrentZeroFinder { public double findZero(double a, double b, double tol) { double fa = _f.evaluate(a); double fb = _f.evaluate(b); return findZero(a,fa,b,fb,tol); } BrentZeroFinder(Function f); double f(double x); double findZero(double a, double b, double tol); double findZero(
double a, double fa, double b, doubl... | BrentZeroFinder { public double findZero(double a, double b, double tol) { double fa = _f.evaluate(a); double fb = _f.evaluate(b); return findZero(a,fa,b,fb,tol); } BrentZeroFinder(Function f); double f(double x); double findZero(double a, double b, double tol); double findZero(
double a, double fa, double b, doubl... |
@Test public void testQS() { Quadratic q = new Quadratic() { public void multiplyHessian(Vect x) { double[] data = ((ArrayVect1)x).getData(); double[] newData = new double[data.length]; newData[0] = 2.*data[0] + 4.*data[1]; newData[1] = 4.*data[0] + 11.*data[1]; data[0] = newData[0]; data[1] = newData[1]; } public void... | public Vect solve(final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); VectConst b = _quadratic.getB(); monitor.report(1.0 / (numberIterations + 2.0)); final double bb = b.dot(b); checkNaN(bb); if (Almost.FLOAT.zero(bb)) { LOG.fine("Gradient of qua... | QuadraticSolver { public Vect solve(final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); VectConst b = _quadratic.getB(); monitor.report(1.0 / (numberIterations + 2.0)); final double bb = b.dot(b); checkNaN(bb); if (Almost.FLOAT.zero(bb)) { LOG.fin... | QuadraticSolver { public Vect solve(final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); VectConst b = _quadratic.getB(); monitor.report(1.0 / (numberIterations + 2.0)); final double bb = b.dot(b); checkNaN(bb); if (Almost.FLOAT.zero(bb)) { LOG.fin... | QuadraticSolver { public Vect solve(final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); VectConst b = _quadratic.getB(); monitor.report(1.0 / (numberIterations + 2.0)); final double bb = b.dot(b); checkNaN(bb); if (Almost.FLOAT.zero(bb)) { LOG.fin... | QuadraticSolver { public Vect solve(final int numberIterations, Monitor monitor) { if (monitor == null) { monitor = Monitor.NULL_MONITOR; } monitor.report(0.0); VectConst b = _quadratic.getB(); monitor.report(1.0 / (numberIterations + 2.0)); final double bb = b.dot(b); checkNaN(bb); if (Almost.FLOAT.zero(bb)) { LOG.fin... |
@Test public void testRandom() { int minSize = 10; int n = 10000; float[] x = randfloat(n); float[] y = randfloat(n); float[] z = randfloat(n); BoundingBoxTree bbt = new BoundingBoxTree(minSize,x,y,z); BoundingBoxTree.Node root = bbt.getRoot(); test(root,minSize,x,y,z); } | public Node getRoot() { return _root; } | BoundingBoxTree { public Node getRoot() { return _root; } } | BoundingBoxTree { public Node getRoot() { return _root; } BoundingBoxTree(int minSize, float[] xyz); BoundingBoxTree(int minSize, float[] x, float[] y, float[] z); } | BoundingBoxTree { public Node getRoot() { return _root; } BoundingBoxTree(int minSize, float[] xyz); BoundingBoxTree(int minSize, float[] x, float[] y, float[] z); Node getRoot(); } | BoundingBoxTree { public Node getRoot() { return _root; } BoundingBoxTree(int minSize, float[] xyz); BoundingBoxTree(int minSize, float[] x, float[] y, float[] z); Node getRoot(); } |
@Test public void testSimple() { DMatrix a = new DMatrix(new double[][]{ {1.0, 1.0}, {1.0, 4.0}, }); test(a); DMatrixChd chd = new DMatrixChd(a); assertEqualFuzzy(3.0,chd.det()); } | public double det() { return _det; } | DMatrixChd { public double det() { return _det; } } | DMatrixChd { public double det() { return _det; } DMatrixChd(DMatrix a); } | DMatrixChd { public double det() { return _det; } DMatrixChd(DMatrix a); boolean isPositiveDefinite(); DMatrix getL(); double det(); DMatrix solve(DMatrix b); } | DMatrixChd { public double det() { return _det; } DMatrixChd(DMatrix a); boolean isPositiveDefinite(); DMatrix getL(); double det(); DMatrix solve(DMatrix b); } |
@Test public void testSimple() { DMatrix a = new DMatrix(new double[][]{ {0.0, 2.0}, {3.0, 4.0}, }); test(a); DMatrixLud lud = new DMatrixLud(a); assertEqualFuzzy(-6.0,lud.det()); } | public double det() { Check.argument(_m==_n,"A is square"); return _det; } | DMatrixLud { public double det() { Check.argument(_m==_n,"A is square"); return _det; } } | DMatrixLud { public double det() { Check.argument(_m==_n,"A is square"); return _det; } DMatrixLud(DMatrix a); } | DMatrixLud { public double det() { Check.argument(_m==_n,"A is square"); return _det; } DMatrixLud(DMatrix a); boolean isSingular(); DMatrix getL(); DMatrix getU(); DMatrix getP(); int[] getPivotIndices(); double det(); DMatrix solve(DMatrix b); } | DMatrixLud { public double det() { Check.argument(_m==_n,"A is square"); return _det; } DMatrixLud(DMatrix a); boolean isSingular(); DMatrix getL(); DMatrix getU(); DMatrix getP(); int[] getPivotIndices(); double det(); DMatrix solve(DMatrix b); } |
@Test public void testRankDeficient() { DMatrix a = new DMatrix(new double[][]{ {0.0, 0.0}, {3.0, 4.0}, }); DMatrixQrd qrd = new DMatrixQrd(a); assertFalse(qrd.isFullRank()); } | public boolean isFullRank() { for (int j=0; j<_n; ++j) { if (_qr[j+j*_m]==0.0) return false; } return true; } | DMatrixQrd { public boolean isFullRank() { for (int j=0; j<_n; ++j) { if (_qr[j+j*_m]==0.0) return false; } return true; } } | DMatrixQrd { public boolean isFullRank() { for (int j=0; j<_n; ++j) { if (_qr[j+j*_m]==0.0) return false; } return true; } DMatrixQrd(DMatrix a); } | DMatrixQrd { public boolean isFullRank() { for (int j=0; j<_n; ++j) { if (_qr[j+j*_m]==0.0) return false; } return true; } DMatrixQrd(DMatrix a); boolean isFullRank(); DMatrix getQ(); DMatrix getR(); DMatrix solve(DMatrix b); } | DMatrixQrd { public boolean isFullRank() { for (int j=0; j<_n; ++j) { if (_qr[j+j*_m]==0.0) return false; } return true; } DMatrixQrd(DMatrix a); boolean isFullRank(); DMatrix getQ(); DMatrix getR(); DMatrix solve(DMatrix b); } |
@Test public void testCond() { DMatrix a = new DMatrix(new double[][]{ {1.0, 3.0}, {7.0, 9.0}, }); int m = a.getM(); int n = a.getN(); DMatrixSvd svd = new DMatrixSvd(a); double[] s = svd.getSingularValues(); double smax = max(s); assertEqualExact(s[0],smax); double smin = min(s); assertEqualExact(s[min(m,n)-1],smin); ... | public double cond() { return _s[0]/_s[_mn-1]; } | DMatrixSvd { public double cond() { return _s[0]/_s[_mn-1]; } } | DMatrixSvd { public double cond() { return _s[0]/_s[_mn-1]; } DMatrixSvd(DMatrix a); } | DMatrixSvd { public double cond() { return _s[0]/_s[_mn-1]; } DMatrixSvd(DMatrix a); DMatrix getU(); DMatrix getS(); double[] getSingularValues(); DMatrix getV(); DMatrix getVTranspose(); double norm2(); double cond(); int rank(); } | DMatrixSvd { public double cond() { return _s[0]/_s[_mn-1]; } DMatrixSvd(DMatrix a); DMatrix getU(); DMatrix getS(); double[] getSingularValues(); DMatrix getV(); DMatrix getVTranspose(); double norm2(); double cond(); int rank(); } |
@Test public void testArgsParser() { String[][] args = { {"-a3.14","-b","foo"}, {"-a","3.14","-b","foo"}, {"--alpha","3.14","--beta","foo"}, {"--a=3.14","--b","foo"}, {"--a=3.14","--b","foo"}, }; for (String[] arg:args) { float a = 0.0f; boolean b = false; try { String shortOpts = "ha:b"; String[] longOpts = {"help","a... | public ArgsParser(String[] args, String shortOpts) throws OptionException { _args = args; _shortOpts = shortOpts; _longOpts = new String[0]; init(); } | ArgsParser { public ArgsParser(String[] args, String shortOpts) throws OptionException { _args = args; _shortOpts = shortOpts; _longOpts = new String[0]; init(); } } | ArgsParser { public ArgsParser(String[] args, String shortOpts) throws OptionException { _args = args; _shortOpts = shortOpts; _longOpts = new String[0]; init(); } ArgsParser(String[] args, String shortOpts); ArgsParser(String[] args, String shortOpts, String[] longOpts); } | ArgsParser { public ArgsParser(String[] args, String shortOpts) throws OptionException { _args = args; _shortOpts = shortOpts; _longOpts = new String[0]; init(); } ArgsParser(String[] args, String shortOpts); ArgsParser(String[] args, String shortOpts, String[] longOpts); String[] getOptions(); String[] getValues(); S... | ArgsParser { public ArgsParser(String[] args, String shortOpts) throws OptionException { _args = args; _shortOpts = shortOpts; _longOpts = new String[0]; init(); } ArgsParser(String[] args, String shortOpts); ArgsParser(String[] args, String shortOpts, String[] longOpts); String[] getOptions(); String[] getValues(); S... |
@Test public void testGetParamsDefaultValuesEmptyNoDSLabel() { IDataSet dummy = new MockDataSet(); Map<String, ?> dvs = GeneralUtilities.getParamsDefaultValuesUseAlsoDB(dummy); Assert.assertNull(dvs); } | public static Map<String, ParamDefaultValue> getParamsDefaultValuesUseAlsoDB(IDataSet dataSet) { Map<String, ParamDefaultValue> res = DataSetUtilities.getParamsDefaultValues(dataSet); if (res != null) { return res; } logger.warn("No params default values found on dataSet. I try from db."); try { String label = dataSet.... | GeneralUtilities extends SpagoBIUtilities { public static Map<String, ParamDefaultValue> getParamsDefaultValuesUseAlsoDB(IDataSet dataSet) { Map<String, ParamDefaultValue> res = DataSetUtilities.getParamsDefaultValues(dataSet); if (res != null) { return res; } logger.warn("No params default values found on dataSet. I t... | GeneralUtilities extends SpagoBIUtilities { public static Map<String, ParamDefaultValue> getParamsDefaultValuesUseAlsoDB(IDataSet dataSet) { Map<String, ParamDefaultValue> res = DataSetUtilities.getParamsDefaultValues(dataSet); if (res != null) { return res; } logger.warn("No params default values found on dataSet. I t... | GeneralUtilities extends SpagoBIUtilities { public static Map<String, ParamDefaultValue> getParamsDefaultValuesUseAlsoDB(IDataSet dataSet) { Map<String, ParamDefaultValue> res = DataSetUtilities.getParamsDefaultValues(dataSet); if (res != null) { return res; } logger.warn("No params default values found on dataSet. I t... | GeneralUtilities extends SpagoBIUtilities { public static Map<String, ParamDefaultValue> getParamsDefaultValuesUseAlsoDB(IDataSet dataSet) { Map<String, ParamDefaultValue> res = DataSetUtilities.getParamsDefaultValues(dataSet); if (res != null) { return res; } logger.warn("No params default values found on dataSet. I t... |
@Test public void testFromXML() throws SourceBeanException { DataSetParametersList fromXML = DataSetParametersList.fromXML(XML); checkParams(fromXML); } | public static DataSetParametersList fromXML(String dataDefinition) throws SourceBeanException { return new DataSetParametersList(dataDefinition); } | DataSetParametersList { public static DataSetParametersList fromXML(String dataDefinition) throws SourceBeanException { return new DataSetParametersList(dataDefinition); } } | DataSetParametersList { public static DataSetParametersList fromXML(String dataDefinition) throws SourceBeanException { return new DataSetParametersList(dataDefinition); } DataSetParametersList(); DataSetParametersList(String dataDefinition); } | DataSetParametersList { public static DataSetParametersList fromXML(String dataDefinition) throws SourceBeanException { return new DataSetParametersList(dataDefinition); } DataSetParametersList(); DataSetParametersList(String dataDefinition); void loadFromXML(String dataDefinition); String toXML(); String getDataSetRe... | DataSetParametersList { public static DataSetParametersList fromXML(String dataDefinition) throws SourceBeanException { return new DataSetParametersList(dataDefinition); } DataSetParametersList(); DataSetParametersList(String dataDefinition); void loadFromXML(String dataDefinition); String toXML(); String getDataSetRe... |
@Test public void getSubstringsBetweenTest() { String delimiter = "'"; String values = "('1')"; String[] result = StringUtilities.getSubstringsBetween(values, delimiter); assertEquals(1, result.length); assertEquals("1", result[0]); values = "('2')"; result = StringUtilities.getSubstringsBetween(values, delimiter); ass... | public static String[] getSubstringsBetween(String values, String delimiter) { try { ArrayList<String> arrayList = new ArrayList<>(); int start = values.indexOf(delimiter); int delimiterLength = delimiter.length(); while (start > -1) { int end = values.indexOf(delimiter, start + delimiterLength); arrayList.add(values.s... | StringUtilities { public static String[] getSubstringsBetween(String values, String delimiter) { try { ArrayList<String> arrayList = new ArrayList<>(); int start = values.indexOf(delimiter); int delimiterLength = delimiter.length(); while (start > -1) { int end = values.indexOf(delimiter, start + delimiterLength); arra... | StringUtilities { public static String[] getSubstringsBetween(String values, String delimiter) { try { ArrayList<String> arrayList = new ArrayList<>(); int start = values.indexOf(delimiter); int delimiterLength = delimiter.length(); while (start > -1) { int end = values.indexOf(delimiter, start + delimiterLength); arra... | StringUtilities { public static String[] getSubstringsBetween(String values, String delimiter) { try { ArrayList<String> arrayList = new ArrayList<>(); int start = values.indexOf(delimiter); int delimiterLength = delimiter.length(); while (start > -1) { int end = values.indexOf(delimiter, start + delimiterLength); arra... | StringUtilities { public static String[] getSubstringsBetween(String values, String delimiter) { try { ArrayList<String> arrayList = new ArrayList<>(); int start = values.indexOf(delimiter); int delimiterLength = delimiter.length(); while (start > -1) { int end = values.indexOf(delimiter, start + delimiterLength); arra... |
@Test(expected = SpagoBIRuntimeException.class) public void getSubstringsBetweenExceptionTest() { String delimiter = "'"; String values = "('D'rink')"; String[] result = StringUtilities.getSubstringsBetween(values, delimiter); } | public static String[] getSubstringsBetween(String values, String delimiter) { try { ArrayList<String> arrayList = new ArrayList<>(); int start = values.indexOf(delimiter); int delimiterLength = delimiter.length(); while (start > -1) { int end = values.indexOf(delimiter, start + delimiterLength); arrayList.add(values.s... | StringUtilities { public static String[] getSubstringsBetween(String values, String delimiter) { try { ArrayList<String> arrayList = new ArrayList<>(); int start = values.indexOf(delimiter); int delimiterLength = delimiter.length(); while (start > -1) { int end = values.indexOf(delimiter, start + delimiterLength); arra... | StringUtilities { public static String[] getSubstringsBetween(String values, String delimiter) { try { ArrayList<String> arrayList = new ArrayList<>(); int start = values.indexOf(delimiter); int delimiterLength = delimiter.length(); while (start > -1) { int end = values.indexOf(delimiter, start + delimiterLength); arra... | StringUtilities { public static String[] getSubstringsBetween(String values, String delimiter) { try { ArrayList<String> arrayList = new ArrayList<>(); int start = values.indexOf(delimiter); int delimiterLength = delimiter.length(); while (start > -1) { int end = values.indexOf(delimiter, start + delimiterLength); arra... | StringUtilities { public static String[] getSubstringsBetween(String values, String delimiter) { try { ArrayList<String> arrayList = new ArrayList<>(); int start = values.indexOf(delimiter); int delimiterLength = delimiter.length(); while (start > -1) { int end = values.indexOf(delimiter, start + delimiterLength); arra... |
@Test public void splitBetweenTest() { String prefix = "'"; String delimiter = "','"; String suffix = "'"; String values = "('D'rink','Fo'od')"; String[] result = StringUtilities.splitBetween(values, prefix, delimiter, suffix); assertEquals(2, result.length); assertEquals("D'rink", result[0]); assertEquals("Fo'od", res... | public static String[] splitBetween(String values, String prefix, String delimiter, String suffix) { int prefixIndex = values.indexOf(prefix); int suffixIndex = values.lastIndexOf(suffix); if (prefixIndex > -1 && suffixIndex > -1) { int prefixLength = prefix.length(); String[] returnedValues = values.substring(prefixIn... | StringUtilities { public static String[] splitBetween(String values, String prefix, String delimiter, String suffix) { int prefixIndex = values.indexOf(prefix); int suffixIndex = values.lastIndexOf(suffix); if (prefixIndex > -1 && suffixIndex > -1) { int prefixLength = prefix.length(); String[] returnedValues = values.... | StringUtilities { public static String[] splitBetween(String values, String prefix, String delimiter, String suffix) { int prefixIndex = values.indexOf(prefix); int suffixIndex = values.lastIndexOf(suffix); if (prefixIndex > -1 && suffixIndex > -1) { int prefixLength = prefix.length(); String[] returnedValues = values.... | StringUtilities { public static String[] splitBetween(String values, String prefix, String delimiter, String suffix) { int prefixIndex = values.indexOf(prefix); int suffixIndex = values.lastIndexOf(suffix); if (prefixIndex > -1 && suffixIndex > -1) { int prefixLength = prefix.length(); String[] returnedValues = values.... | StringUtilities { public static String[] splitBetween(String values, String prefix, String delimiter, String suffix) { int prefixIndex = values.indexOf(prefix); int suffixIndex = values.lastIndexOf(suffix); if (prefixIndex > -1 && suffixIndex > -1) { int prefixLength = prefix.length(); String[] returnedValues = values.... |
@Test(expected = SpagoBIRuntimeException.class) public void splitBetweenExceptionTest() { String prefix = "**"; String delimiter = "','"; String suffix = "'"; String values = "('D'rink','Fo'od')"; String[] result = StringUtilities.splitBetween(values, prefix, delimiter, suffix); } | public static String[] splitBetween(String values, String prefix, String delimiter, String suffix) { int prefixIndex = values.indexOf(prefix); int suffixIndex = values.lastIndexOf(suffix); if (prefixIndex > -1 && suffixIndex > -1) { int prefixLength = prefix.length(); String[] returnedValues = values.substring(prefixIn... | StringUtilities { public static String[] splitBetween(String values, String prefix, String delimiter, String suffix) { int prefixIndex = values.indexOf(prefix); int suffixIndex = values.lastIndexOf(suffix); if (prefixIndex > -1 && suffixIndex > -1) { int prefixLength = prefix.length(); String[] returnedValues = values.... | StringUtilities { public static String[] splitBetween(String values, String prefix, String delimiter, String suffix) { int prefixIndex = values.indexOf(prefix); int suffixIndex = values.lastIndexOf(suffix); if (prefixIndex > -1 && suffixIndex > -1) { int prefixLength = prefix.length(); String[] returnedValues = values.... | StringUtilities { public static String[] splitBetween(String values, String prefix, String delimiter, String suffix) { int prefixIndex = values.indexOf(prefix); int suffixIndex = values.lastIndexOf(suffix); if (prefixIndex > -1 && suffixIndex > -1) { int prefixLength = prefix.length(); String[] returnedValues = values.... | StringUtilities { public static String[] splitBetween(String values, String prefix, String delimiter, String suffix) { int prefixIndex = values.indexOf(prefix); int suffixIndex = values.lastIndexOf(suffix); if (prefixIndex > -1 && suffixIndex > -1) { int prefixLength = prefix.length(); String[] returnedValues = values.... |
@Test public void testIsMultiValue() { ParametersDecoder decoder = new ParametersDecoder(); String value = "{;{American;Colony;Ebony;Johnson;Urban}STRING}"; boolean isMultiValue = decoder.isMultiValues(value); assertTrue(isMultiValue); String json = "{name: {a : 4, b : 4}}"; isMultiValue = decoder.isMultiValues(json); ... | public boolean isMultiValues(String value) { return value.trim().matches(multiValueRegex); } | ParametersDecoder { public boolean isMultiValues(String value) { return value.trim().matches(multiValueRegex); } } | ParametersDecoder { public boolean isMultiValues(String value) { return value.trim().matches(multiValueRegex); } ParametersDecoder(); ParametersDecoder(String openBlockMarker, String closeBlockMarker); } | ParametersDecoder { public boolean isMultiValues(String value) { return value.trim().matches(multiValueRegex); } ParametersDecoder(); ParametersDecoder(String openBlockMarker, String closeBlockMarker); String getCloseBlockMarker(); void setCloseBlockMarker(String closeBlockMarker); String getOpenBlockMarker(); void se... | ParametersDecoder { public boolean isMultiValues(String value) { return value.trim().matches(multiValueRegex); } ParametersDecoder(); ParametersDecoder(String openBlockMarker, String closeBlockMarker); String getCloseBlockMarker(); void setCloseBlockMarker(String closeBlockMarker); String getOpenBlockMarker(); void se... |
@Test public void testExecuteGetService() throws Exception { SimpleRestClient client = getSimpleRestClient(); Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("a", "b"); parameters.put("c", "d"); Response resp = client.executeGetService(parameters, "http: Assert.assertEquals(200, resp.getS... | protected Response executeGetService(Map<String, Object> parameters, String serviceUrl, String userId) throws Exception { return executeService(parameters, serviceUrl, userId, RequestTypeEnum.GET, null, null); } | SimpleRestClient { protected Response executeGetService(Map<String, Object> parameters, String serviceUrl, String userId) throws Exception { return executeService(parameters, serviceUrl, userId, RequestTypeEnum.GET, null, null); } } | SimpleRestClient { protected Response executeGetService(Map<String, Object> parameters, String serviceUrl, String userId) throws Exception { return executeService(parameters, serviceUrl, userId, RequestTypeEnum.GET, null, null); } SimpleRestClient(String hmacKey); SimpleRestClient(); } | SimpleRestClient { protected Response executeGetService(Map<String, Object> parameters, String serviceUrl, String userId) throws Exception { return executeService(parameters, serviceUrl, userId, RequestTypeEnum.GET, null, null); } SimpleRestClient(String hmacKey); SimpleRestClient(); boolean isAddServerUrl(); void set... | SimpleRestClient { protected Response executeGetService(Map<String, Object> parameters, String serviceUrl, String userId) throws Exception { return executeService(parameters, serviceUrl, userId, RequestTypeEnum.GET, null, null); } SimpleRestClient(String hmacKey); SimpleRestClient(); boolean isAddServerUrl(); void set... |
@Test public void testExecuteGetServiceFail() throws Exception { SimpleRestClient client = getSimpleRestClientFail(); Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("a", "b"); parameters.put("c", "d"); boolean done = false; try { client.executeGetService(parameters, "http: } catch (Excep... | protected Response executeGetService(Map<String, Object> parameters, String serviceUrl, String userId) throws Exception { return executeService(parameters, serviceUrl, userId, RequestTypeEnum.GET, null, null); } | SimpleRestClient { protected Response executeGetService(Map<String, Object> parameters, String serviceUrl, String userId) throws Exception { return executeService(parameters, serviceUrl, userId, RequestTypeEnum.GET, null, null); } } | SimpleRestClient { protected Response executeGetService(Map<String, Object> parameters, String serviceUrl, String userId) throws Exception { return executeService(parameters, serviceUrl, userId, RequestTypeEnum.GET, null, null); } SimpleRestClient(String hmacKey); SimpleRestClient(); } | SimpleRestClient { protected Response executeGetService(Map<String, Object> parameters, String serviceUrl, String userId) throws Exception { return executeService(parameters, serviceUrl, userId, RequestTypeEnum.GET, null, null); } SimpleRestClient(String hmacKey); SimpleRestClient(); boolean isAddServerUrl(); void set... | SimpleRestClient { protected Response executeGetService(Map<String, Object> parameters, String serviceUrl, String userId) throws Exception { return executeService(parameters, serviceUrl, userId, RequestTypeEnum.GET, null, null); } SimpleRestClient(String hmacKey); SimpleRestClient(); boolean isAddServerUrl(); void set... |
@Test public void testExecutePostService() throws Exception { SimpleRestClient client = getSimpleRestClient(); Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("a", "b"); parameters.put("c", "d"); Response resp = client.executePostService(parameters, "http: Assert.assertEquals(200, resp.ge... | protected Response executePostService(Map<String, Object> parameters, String serviceUrl, String userId, String mediaType, Object data) throws Exception { return executeService(parameters, serviceUrl, userId, RequestTypeEnum.POST, mediaType, data); } | SimpleRestClient { protected Response executePostService(Map<String, Object> parameters, String serviceUrl, String userId, String mediaType, Object data) throws Exception { return executeService(parameters, serviceUrl, userId, RequestTypeEnum.POST, mediaType, data); } } | SimpleRestClient { protected Response executePostService(Map<String, Object> parameters, String serviceUrl, String userId, String mediaType, Object data) throws Exception { return executeService(parameters, serviceUrl, userId, RequestTypeEnum.POST, mediaType, data); } SimpleRestClient(String hmacKey); SimpleRestClient... | SimpleRestClient { protected Response executePostService(Map<String, Object> parameters, String serviceUrl, String userId, String mediaType, Object data) throws Exception { return executeService(parameters, serviceUrl, userId, RequestTypeEnum.POST, mediaType, data); } SimpleRestClient(String hmacKey); SimpleRestClient... | SimpleRestClient { protected Response executePostService(Map<String, Object> parameters, String serviceUrl, String userId, String mediaType, Object data) throws Exception { return executeService(parameters, serviceUrl, userId, RequestTypeEnum.POST, mediaType, data); } SimpleRestClient(String hmacKey); SimpleRestClient... |
@Test public void testExecutePostServiceFail() throws Exception { SimpleRestClient client = getSimpleRestClientFail(); Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("a", "b"); parameters.put("c", "d"); boolean done = false; try { client.executePostService(parameters, "http: } catch (Exc... | protected Response executePostService(Map<String, Object> parameters, String serviceUrl, String userId, String mediaType, Object data) throws Exception { return executeService(parameters, serviceUrl, userId, RequestTypeEnum.POST, mediaType, data); } | SimpleRestClient { protected Response executePostService(Map<String, Object> parameters, String serviceUrl, String userId, String mediaType, Object data) throws Exception { return executeService(parameters, serviceUrl, userId, RequestTypeEnum.POST, mediaType, data); } } | SimpleRestClient { protected Response executePostService(Map<String, Object> parameters, String serviceUrl, String userId, String mediaType, Object data) throws Exception { return executeService(parameters, serviceUrl, userId, RequestTypeEnum.POST, mediaType, data); } SimpleRestClient(String hmacKey); SimpleRestClient... | SimpleRestClient { protected Response executePostService(Map<String, Object> parameters, String serviceUrl, String userId, String mediaType, Object data) throws Exception { return executeService(parameters, serviceUrl, userId, RequestTypeEnum.POST, mediaType, data); } SimpleRestClient(String hmacKey); SimpleRestClient... | SimpleRestClient { protected Response executePostService(Map<String, Object> parameters, String serviceUrl, String userId, String mediaType, Object data) throws Exception { return executeService(parameters, serviceUrl, userId, RequestTypeEnum.POST, mediaType, data); } SimpleRestClient(String hmacKey); SimpleRestClient... |
@Test public void testGetParamsDefaultValuesParamsStringNoDSLabel() { IDataSet dummy = new MockDataSet(); dummy.setParameters(DataSetParametersListTest.XML); Map<String, ?> dvs = GeneralUtilities.getParamsDefaultValuesUseAlsoDB(dummy); Assert.assertEquals(2, dvs.size()); Assert.assertEquals(DataSetParametersListTest.FI... | public static Map<String, ParamDefaultValue> getParamsDefaultValuesUseAlsoDB(IDataSet dataSet) { Map<String, ParamDefaultValue> res = DataSetUtilities.getParamsDefaultValues(dataSet); if (res != null) { return res; } logger.warn("No params default values found on dataSet. I try from db."); try { String label = dataSet.... | GeneralUtilities extends SpagoBIUtilities { public static Map<String, ParamDefaultValue> getParamsDefaultValuesUseAlsoDB(IDataSet dataSet) { Map<String, ParamDefaultValue> res = DataSetUtilities.getParamsDefaultValues(dataSet); if (res != null) { return res; } logger.warn("No params default values found on dataSet. I t... | GeneralUtilities extends SpagoBIUtilities { public static Map<String, ParamDefaultValue> getParamsDefaultValuesUseAlsoDB(IDataSet dataSet) { Map<String, ParamDefaultValue> res = DataSetUtilities.getParamsDefaultValues(dataSet); if (res != null) { return res; } logger.warn("No params default values found on dataSet. I t... | GeneralUtilities extends SpagoBIUtilities { public static Map<String, ParamDefaultValue> getParamsDefaultValuesUseAlsoDB(IDataSet dataSet) { Map<String, ParamDefaultValue> res = DataSetUtilities.getParamsDefaultValues(dataSet); if (res != null) { return res; } logger.warn("No params default values found on dataSet. I t... | GeneralUtilities extends SpagoBIUtilities { public static Map<String, ParamDefaultValue> getParamsDefaultValuesUseAlsoDB(IDataSet dataSet) { Map<String, ParamDefaultValue> res = DataSetUtilities.getParamsDefaultValues(dataSet); if (res != null) { return res; } logger.warn("No params default values found on dataSet. I t... |
@Test public void testDoFilter() throws IOException, NoSuchAlgorithmException, HMACSecurityException { Map<String, String> headers = new HashMap<String, String>(); String token = "" + System.currentTimeMillis(); headers.put(HMACUtils.HMAC_TOKEN_HEADER, token); headers.put(HMACUtils.HMAC_SIGNATURE_HEADER, getSignature("... | @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if (!(request instanceof HttpServletRequest)) { throw new IllegalArgumentException("request not instance of HttpServletRequest"); } HttpServletRequest req = (HttpServletRequest) req... | HMACFilter implements Filter { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if (!(request instanceof HttpServletRequest)) { throw new IllegalArgumentException("request not instance of HttpServletRequest"); } HttpServletRequest... | HMACFilter implements Filter { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if (!(request instanceof HttpServletRequest)) { throw new IllegalArgumentException("request not instance of HttpServletRequest"); } HttpServletRequest... | HMACFilter implements Filter { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if (!(request instanceof HttpServletRequest)) { throw new IllegalArgumentException("request not instance of HttpServletRequest"); } HttpServletRequest... | HMACFilter implements Filter { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if (!(request instanceof HttpServletRequest)) { throw new IllegalArgumentException("request not instance of HttpServletRequest"); } HttpServletRequest... |
@Test public void shouldReturnRealtimeStrategyType() { RealtimeEvaluationStrategy strategy = (RealtimeEvaluationStrategy) DatasetEvaluationStrategyFactory.get(DatasetEvaluationStrategyType.REALTIME, new MockDataSet(), new UserProfile()); assertThat(strategy.getEvaluationStrategy(), is(DatasetEvaluationStrategyType.REAL... | @Override protected DatasetEvaluationStrategyType getEvaluationStrategy() { return DatasetEvaluationStrategyType.REALTIME; } | RealtimeEvaluationStrategy extends CachedEvaluationStrategy { @Override protected DatasetEvaluationStrategyType getEvaluationStrategy() { return DatasetEvaluationStrategyType.REALTIME; } } | RealtimeEvaluationStrategy extends CachedEvaluationStrategy { @Override protected DatasetEvaluationStrategyType getEvaluationStrategy() { return DatasetEvaluationStrategyType.REALTIME; } RealtimeEvaluationStrategy(UserProfile userProfile, IDataSet dataSet, ICache cache); } | RealtimeEvaluationStrategy extends CachedEvaluationStrategy { @Override protected DatasetEvaluationStrategyType getEvaluationStrategy() { return DatasetEvaluationStrategyType.REALTIME; } RealtimeEvaluationStrategy(UserProfile userProfile, IDataSet dataSet, ICache cache); } | RealtimeEvaluationStrategy extends CachedEvaluationStrategy { @Override protected DatasetEvaluationStrategyType getEvaluationStrategy() { return DatasetEvaluationStrategyType.REALTIME; } RealtimeEvaluationStrategy(UserProfile userProfile, IDataSet dataSet, ICache cache); } |
@Test public void shouldGetPersistedStrategy() { IDatasetEvaluationStrategy strategy = DatasetEvaluationStrategyFactory.get(DatasetEvaluationStrategyType.PERSISTED, dataSet, new UserProfile()); Assert.assertThat(strategy, instanceOf(PersistedEvaluationStrategy.class)); } | public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { case PERSISTED: return new PersistedE... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... |
@Test public void shouldGetFlatStrategy() { IDatasetEvaluationStrategy strategy = DatasetEvaluationStrategyFactory.get(DatasetEvaluationStrategyType.FLAT, dataSet, new UserProfile()); Assert.assertThat(strategy, instanceOf(FlatEvaluationStrategy.class)); } | public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { case PERSISTED: return new PersistedE... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... |
@Test public void shouldGetInlineViewStrategy() { IDatasetEvaluationStrategy strategy = DatasetEvaluationStrategyFactory.get(DatasetEvaluationStrategyType.INLINE_VIEW, dataSet, new UserProfile()); Assert.assertThat(strategy, instanceOf(InlineViewEvaluationStrategy.class)); } | public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { case PERSISTED: return new PersistedE... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... |
@Test public void shouldGetCachedStrategy() { IDatasetEvaluationStrategy strategy = DatasetEvaluationStrategyFactory.get(DatasetEvaluationStrategyType.CACHED, dataSet, new UserProfile()); Assert.assertThat(strategy, instanceOf(CachedEvaluationStrategy.class)); } | public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { case PERSISTED: return new PersistedE... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... |
@Test public void shouldGetRealtimeStrategy() { IDatasetEvaluationStrategy strategy = DatasetEvaluationStrategyFactory.get(DatasetEvaluationStrategyType.REALTIME, dataSet, new UserProfile()); Assert.assertThat(strategy, instanceOf(RealtimeEvaluationStrategy.class)); } | public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { case PERSISTED: return new PersistedE... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... |
@Test public void shouldGetSolrStrategy() { IDatasetEvaluationStrategy strategy = DatasetEvaluationStrategyFactory.get(DatasetEvaluationStrategyType.SOLR, dataSet, new UserProfile()); Assert.assertThat(strategy, instanceOf(SolrEvaluationStrategy.class)); } | public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { case PERSISTED: return new PersistedE... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... |
@Test(expected = NullReferenceException.class) public void shouldNotAllowNullableDatasetAsArgument() { DatasetEvaluationStrategyFactory.get(DatasetEvaluationStrategyType.REALTIME, null, new UserProfile()); } | public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { case PERSISTED: return new PersistedE... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... |
@Test(expected = NullReferenceException.class) public void shouldNotAllowNullableStrategyTypeAsArgument() { DatasetEvaluationStrategyFactory.get(null, dataSet, new UserProfile()); } | public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { case PERSISTED: return new PersistedE... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... |
@Test public void testGetParamsDefaultValuesWithDSLabelFromDB() { IDataSet dummy = new MockDataSet(); dummy.setLabel(DataSetUtilitiesTest.DATA_SET_QUERY_TEST); Map<String, ParamDefaultValue> dvs = GeneralUtilities.getParamsDefaultValuesUseAlsoDB(dummy); DataSetUtilitiesTest.checkQueryDataSetDefaultValues(dvs); } | public static Map<String, ParamDefaultValue> getParamsDefaultValuesUseAlsoDB(IDataSet dataSet) { Map<String, ParamDefaultValue> res = DataSetUtilities.getParamsDefaultValues(dataSet); if (res != null) { return res; } logger.warn("No params default values found on dataSet. I try from db."); try { String label = dataSet.... | GeneralUtilities extends SpagoBIUtilities { public static Map<String, ParamDefaultValue> getParamsDefaultValuesUseAlsoDB(IDataSet dataSet) { Map<String, ParamDefaultValue> res = DataSetUtilities.getParamsDefaultValues(dataSet); if (res != null) { return res; } logger.warn("No params default values found on dataSet. I t... | GeneralUtilities extends SpagoBIUtilities { public static Map<String, ParamDefaultValue> getParamsDefaultValuesUseAlsoDB(IDataSet dataSet) { Map<String, ParamDefaultValue> res = DataSetUtilities.getParamsDefaultValues(dataSet); if (res != null) { return res; } logger.warn("No params default values found on dataSet. I t... | GeneralUtilities extends SpagoBIUtilities { public static Map<String, ParamDefaultValue> getParamsDefaultValuesUseAlsoDB(IDataSet dataSet) { Map<String, ParamDefaultValue> res = DataSetUtilities.getParamsDefaultValues(dataSet); if (res != null) { return res; } logger.warn("No params default values found on dataSet. I t... | GeneralUtilities extends SpagoBIUtilities { public static Map<String, ParamDefaultValue> getParamsDefaultValuesUseAlsoDB(IDataSet dataSet) { Map<String, ParamDefaultValue> res = DataSetUtilities.getParamsDefaultValues(dataSet); if (res != null) { return res; } logger.warn("No params default values found on dataSet. I t... |
@Test(expected = NullReferenceException.class) public void shouldNotAllowBothNullableStrategyTypeAndDatasetAsArguments() { DatasetEvaluationStrategyFactory.get(null, null, new UserProfile()); } | public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { case PERSISTED: return new PersistedE... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... |
@Test(expected = NullReferenceException.class) public void shouldNotAllowNullableUserProfileAsArgumentForRealtimeStrategy() { DatasetEvaluationStrategyFactory.get(DatasetEvaluationStrategyType.REALTIME, dataSet, null); } | public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { case PERSISTED: return new PersistedE... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... |
@Test(expected = NullReferenceException.class) public void shouldNotAllowNullableUserProfileAsArgumentForCacheStrategy() { DatasetEvaluationStrategyFactory.get(DatasetEvaluationStrategyType.CACHED, dataSet, null); } | public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { case PERSISTED: return new PersistedE... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... | DatasetEvaluationStrategyFactory { public static IDatasetEvaluationStrategy get(DatasetEvaluationStrategyType strategyType, IDataSet dataSet, UserProfile userProfile) { Assert.assertNotNull(strategyType, "Strategy type cannot be null"); Assert.assertNotNull(dataSet, "Dataset cannot be null"); switch (strategyType) { ca... |
@Test public void shouldUsePersistedTableName() { final String TABLE_NAME = "PersistedTable"; MockDataSet dataSet = new MockDataSet(); dataSet.setPersistTableName(TABLE_NAME); PersistedEvaluationStrategy strategy = (PersistedEvaluationStrategy) DatasetEvaluationStrategyFactory.get(DatasetEvaluationStrategyType.PERSISTE... | @Override protected String getTableName() { return dataSet.getPersistTableName(); } | PersistedEvaluationStrategy extends AbstractJdbcEvaluationStrategy { @Override protected String getTableName() { return dataSet.getPersistTableName(); } } | PersistedEvaluationStrategy extends AbstractJdbcEvaluationStrategy { @Override protected String getTableName() { return dataSet.getPersistTableName(); } PersistedEvaluationStrategy(IDataSet dataSet); } | PersistedEvaluationStrategy extends AbstractJdbcEvaluationStrategy { @Override protected String getTableName() { return dataSet.getPersistTableName(); } PersistedEvaluationStrategy(IDataSet dataSet); } | PersistedEvaluationStrategy extends AbstractJdbcEvaluationStrategy { @Override protected String getTableName() { return dataSet.getPersistTableName(); } PersistedEvaluationStrategy(IDataSet dataSet); } |
@Test public void shouldUseDatasourceForWriting() { final String DATASOURCE_LABEL = "DatasourceForWriting"; MockDataSet dataSet = new MockDataSet(); IDataSource dataSource = DataSourceFactory.getDataSource(); dataSource.setLabel(DATASOURCE_LABEL); dataSet.setDataSourceForWriting(dataSource); PersistedEvaluationStrategy... | @Override protected IDataSource getDataSource() { return dataSet.getDataSourceForWriting(); } | PersistedEvaluationStrategy extends AbstractJdbcEvaluationStrategy { @Override protected IDataSource getDataSource() { return dataSet.getDataSourceForWriting(); } } | PersistedEvaluationStrategy extends AbstractJdbcEvaluationStrategy { @Override protected IDataSource getDataSource() { return dataSet.getDataSourceForWriting(); } PersistedEvaluationStrategy(IDataSet dataSet); } | PersistedEvaluationStrategy extends AbstractJdbcEvaluationStrategy { @Override protected IDataSource getDataSource() { return dataSet.getDataSourceForWriting(); } PersistedEvaluationStrategy(IDataSet dataSet); } | PersistedEvaluationStrategy extends AbstractJdbcEvaluationStrategy { @Override protected IDataSource getDataSource() { return dataSet.getDataSourceForWriting(); } PersistedEvaluationStrategy(IDataSet dataSet); } |
@Test public void shouldUsePreviousFireTimeToSetDataStoreDate() { final Date now = new Date(); new MockUp<PersistedEvaluationStrategy>() { @Mock private Trigger loadTrigger() { Trigger trigger = new Trigger(); trigger.setPreviousFireTime(now); return trigger; } }; PersistedEvaluationStrategy strategy = (PersistedEvalua... | @Override protected Date getDate() { Date toReturn = null; Trigger trigger = loadTrigger(); Date previousFireTime = null; if (trigger != null) { previousFireTime = trigger.getPreviousFireTime(); } if (previousFireTime != null) { toReturn = previousFireTime; } else { toReturn = dataSet.getDateIn(); } return toReturn; } | PersistedEvaluationStrategy extends AbstractJdbcEvaluationStrategy { @Override protected Date getDate() { Date toReturn = null; Trigger trigger = loadTrigger(); Date previousFireTime = null; if (trigger != null) { previousFireTime = trigger.getPreviousFireTime(); } if (previousFireTime != null) { toReturn = previousFir... | PersistedEvaluationStrategy extends AbstractJdbcEvaluationStrategy { @Override protected Date getDate() { Date toReturn = null; Trigger trigger = loadTrigger(); Date previousFireTime = null; if (trigger != null) { previousFireTime = trigger.getPreviousFireTime(); } if (previousFireTime != null) { toReturn = previousFir... | PersistedEvaluationStrategy extends AbstractJdbcEvaluationStrategy { @Override protected Date getDate() { Date toReturn = null; Trigger trigger = loadTrigger(); Date previousFireTime = null; if (trigger != null) { previousFireTime = trigger.getPreviousFireTime(); } if (previousFireTime != null) { toReturn = previousFir... | PersistedEvaluationStrategy extends AbstractJdbcEvaluationStrategy { @Override protected Date getDate() { Date toReturn = null; Trigger trigger = loadTrigger(); Date previousFireTime = null; if (trigger != null) { previousFireTime = trigger.getPreviousFireTime(); } if (previousFireTime != null) { toReturn = previousFir... |
@Test public void shouldUseDatasetDateInToSetDataStoreDate() { final Date now = new Date(); new MockUp<PersistedEvaluationStrategy>() { @Mock private Trigger loadTrigger() { return new Trigger(); } }; MockDataSet dataSet = new MockDataSet(); dataSet.setDateIn(now); PersistedEvaluationStrategy strategy = (PersistedEvalu... | @Override protected Date getDate() { Date toReturn = null; Trigger trigger = loadTrigger(); Date previousFireTime = null; if (trigger != null) { previousFireTime = trigger.getPreviousFireTime(); } if (previousFireTime != null) { toReturn = previousFireTime; } else { toReturn = dataSet.getDateIn(); } return toReturn; } | PersistedEvaluationStrategy extends AbstractJdbcEvaluationStrategy { @Override protected Date getDate() { Date toReturn = null; Trigger trigger = loadTrigger(); Date previousFireTime = null; if (trigger != null) { previousFireTime = trigger.getPreviousFireTime(); } if (previousFireTime != null) { toReturn = previousFir... | PersistedEvaluationStrategy extends AbstractJdbcEvaluationStrategy { @Override protected Date getDate() { Date toReturn = null; Trigger trigger = loadTrigger(); Date previousFireTime = null; if (trigger != null) { previousFireTime = trigger.getPreviousFireTime(); } if (previousFireTime != null) { toReturn = previousFir... | PersistedEvaluationStrategy extends AbstractJdbcEvaluationStrategy { @Override protected Date getDate() { Date toReturn = null; Trigger trigger = loadTrigger(); Date previousFireTime = null; if (trigger != null) { previousFireTime = trigger.getPreviousFireTime(); } if (previousFireTime != null) { toReturn = previousFir... | PersistedEvaluationStrategy extends AbstractJdbcEvaluationStrategy { @Override protected Date getDate() { Date toReturn = null; Trigger trigger = loadTrigger(); Date previousFireTime = null; if (trigger != null) { previousFireTime = trigger.getPreviousFireTime(); } if (previousFireTime != null) { toReturn = previousFir... |
@Test public void shouldReturnCachedStrategyType() { CachedEvaluationStrategy strategy = (CachedEvaluationStrategy) DatasetEvaluationStrategyFactory.get(DatasetEvaluationStrategyType.CACHED, new MockDataSet(), new UserProfile()); assertThat(strategy.getEvaluationStrategy(), is(DatasetEvaluationStrategyType.CACHED)); } | protected DatasetEvaluationStrategyType getEvaluationStrategy() { return DatasetEvaluationStrategyType.CACHED; } | CachedEvaluationStrategy extends AbstractEvaluationStrategy { protected DatasetEvaluationStrategyType getEvaluationStrategy() { return DatasetEvaluationStrategyType.CACHED; } } | CachedEvaluationStrategy extends AbstractEvaluationStrategy { protected DatasetEvaluationStrategyType getEvaluationStrategy() { return DatasetEvaluationStrategyType.CACHED; } CachedEvaluationStrategy(UserProfile userProfile, IDataSet dataSet, ICache cache); } | CachedEvaluationStrategy extends AbstractEvaluationStrategy { protected DatasetEvaluationStrategyType getEvaluationStrategy() { return DatasetEvaluationStrategyType.CACHED; } CachedEvaluationStrategy(UserProfile userProfile, IDataSet dataSet, ICache cache); } | CachedEvaluationStrategy extends AbstractEvaluationStrategy { protected DatasetEvaluationStrategyType getEvaluationStrategy() { return DatasetEvaluationStrategyType.CACHED; } CachedEvaluationStrategy(UserProfile userProfile, IDataSet dataSet, ICache cache); } |
@Test public void testGetSingleValue() { String[] types = new String[] { DataSetUtilities.GENERIC_TYPE, DataSetUtilities.NUMBER_TYPE, DataSetUtilities.RAW_TYPE, DataSetUtilities.STRING_TYPE }; String[] values = new String[] { "", "'", "''", "0", "'0", "0'", "'0'", "17", "abc", "'qcd'", "'qcd", "qcd'" }; Map<String, Map... | static String getSingleValue(String value, String type) { String toReturn = ""; value = value.trim(); if (type.equalsIgnoreCase(DataSetUtilities.STRING_TYPE)) { if (!(value.startsWith("'") && value.endsWith("'"))) { toReturn = "'" + value + "'"; } else { toReturn = value; } } else if (type.equalsIgnoreCase(DataSetUtili... | ManageDatasets extends AbstractSpagoBIAction { static String getSingleValue(String value, String type) { String toReturn = ""; value = value.trim(); if (type.equalsIgnoreCase(DataSetUtilities.STRING_TYPE)) { if (!(value.startsWith("'") && value.endsWith("'"))) { toReturn = "'" + value + "'"; } else { toReturn = value; ... | ManageDatasets extends AbstractSpagoBIAction { static String getSingleValue(String value, String type) { String toReturn = ""; value = value.trim(); if (type.equalsIgnoreCase(DataSetUtilities.STRING_TYPE)) { if (!(value.startsWith("'") && value.endsWith("'"))) { toReturn = "'" + value + "'"; } else { toReturn = value; ... | ManageDatasets extends AbstractSpagoBIAction { static String getSingleValue(String value, String type) { String toReturn = ""; value = value.trim(); if (type.equalsIgnoreCase(DataSetUtilities.STRING_TYPE)) { if (!(value.startsWith("'") && value.endsWith("'"))) { toReturn = "'" + value + "'"; } else { toReturn = value; ... | ManageDatasets extends AbstractSpagoBIAction { static String getSingleValue(String value, String type) { String toReturn = ""; value = value.trim(); if (type.equalsIgnoreCase(DataSetUtilities.STRING_TYPE)) { if (!(value.startsWith("'") && value.endsWith("'"))) { toReturn = "'" + value + "'"; } else { toReturn = value; ... |
@Test public void testEquals() { assertEquals(new LabeledEdge<String>("x", "y", "label"), new LabeledEdge<String>("x", "y", "label")); assertEquals(new LabeledEdge<String>("x", "y", "label"), new LabeledEdge<String>("y", "x", "label")); assertNotEquals(new LabeledEdge<String>("x", "y", "label"), new LabeledEdge<String>... | @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; LabeledEdge other = (LabeledEdge) obj; if (label == null) { if (other.label != null) return false; } else if (!label.equals(other.label)) return false; if (source ==... | LabeledEdge extends DefaultEdge { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; LabeledEdge other = (LabeledEdge) obj; if (label == null) { if (other.label != null) return false; } else if (!label.equals(other.l... | LabeledEdge extends DefaultEdge { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; LabeledEdge other = (LabeledEdge) obj; if (label == null) { if (other.label != null) return false; } else if (!label.equals(other.l... | LabeledEdge extends DefaultEdge { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; LabeledEdge other = (LabeledEdge) obj; if (label == null) { if (other.label != null) return false; } else if (!label.equals(other.l... | LabeledEdge extends DefaultEdge { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; LabeledEdge other = (LabeledEdge) obj; if (label == null) { if (other.label != null) return false; } else if (!label.equals(other.l... |
@Test public void testGetParamsDefaultValuesEmptyDSAndNoDB() { IDataSet dummy = new MockDataSet(); dummy.setLabel("doesntExist18"); Map<String, ?> dvs = GeneralUtilities.getParamsDefaultValuesUseAlsoDB(dummy); Assert.assertNull(dvs); } | public static Map<String, ParamDefaultValue> getParamsDefaultValuesUseAlsoDB(IDataSet dataSet) { Map<String, ParamDefaultValue> res = DataSetUtilities.getParamsDefaultValues(dataSet); if (res != null) { return res; } logger.warn("No params default values found on dataSet. I try from db."); try { String label = dataSet.... | GeneralUtilities extends SpagoBIUtilities { public static Map<String, ParamDefaultValue> getParamsDefaultValuesUseAlsoDB(IDataSet dataSet) { Map<String, ParamDefaultValue> res = DataSetUtilities.getParamsDefaultValues(dataSet); if (res != null) { return res; } logger.warn("No params default values found on dataSet. I t... | GeneralUtilities extends SpagoBIUtilities { public static Map<String, ParamDefaultValue> getParamsDefaultValuesUseAlsoDB(IDataSet dataSet) { Map<String, ParamDefaultValue> res = DataSetUtilities.getParamsDefaultValues(dataSet); if (res != null) { return res; } logger.warn("No params default values found on dataSet. I t... | GeneralUtilities extends SpagoBIUtilities { public static Map<String, ParamDefaultValue> getParamsDefaultValuesUseAlsoDB(IDataSet dataSet) { Map<String, ParamDefaultValue> res = DataSetUtilities.getParamsDefaultValues(dataSet); if (res != null) { return res; } logger.warn("No params default values found on dataSet. I t... | GeneralUtilities extends SpagoBIUtilities { public static Map<String, ParamDefaultValue> getParamsDefaultValuesUseAlsoDB(IDataSet dataSet) { Map<String, ParamDefaultValue> res = DataSetUtilities.getParamsDefaultValues(dataSet); if (res != null) { return res; } logger.warn("No params default values found on dataSet. I t... |
@Test public void testEquals() { assertEquals(eg1, eg1); assertEquals(eg1, eg2); assertNotEquals(eg1, eg3); } | @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (!(obj instanceof EdgeGroup)) return false; EdgeGroup other = (EdgeGroup) obj; if (orderedEdgeNames == null) { if (other.orderedEdgeNames != null) return false; } else if (!orderedEdgeNames.equals(other.ordered... | EdgeGroup { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (!(obj instanceof EdgeGroup)) return false; EdgeGroup other = (EdgeGroup) obj; if (orderedEdgeNames == null) { if (other.orderedEdgeNames != null) return false; } else if (!orderedEdgeNames.equals(o... | EdgeGroup { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (!(obj instanceof EdgeGroup)) return false; EdgeGroup other = (EdgeGroup) obj; if (orderedEdgeNames == null) { if (other.orderedEdgeNames != null) return false; } else if (!orderedEdgeNames.equals(o... | EdgeGroup { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (!(obj instanceof EdgeGroup)) return false; EdgeGroup other = (EdgeGroup) obj; if (orderedEdgeNames == null) { if (other.orderedEdgeNames != null) return false; } else if (!orderedEdgeNames.equals(o... | EdgeGroup { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (!(obj instanceof EdgeGroup)) return false; EdgeGroup other = (EdgeGroup) obj; if (orderedEdgeNames == null) { if (other.orderedEdgeNames != null) return false; } else if (!orderedEdgeNames.equals(o... |
@Test public void testGetColumnNames() { assertEquals(eg1.getOrderedEdgeNames(), eg1.getOrderedEdgeNames()); assertEquals(eg1.getOrderedEdgeNames(), eg4.getOrderedEdgeNames()); } | public String getOrderedEdgeNames() { return orderedEdgeNames; } | EdgeGroup { public String getOrderedEdgeNames() { return orderedEdgeNames; } } | EdgeGroup { public String getOrderedEdgeNames() { return orderedEdgeNames; } EdgeGroup(Set<LabeledEdge<String>> edges); } | EdgeGroup { public String getOrderedEdgeNames() { return orderedEdgeNames; } EdgeGroup(Set<LabeledEdge<String>> edges); Set<String> getEdgeNames(); String getOrderedEdgeNames(); Set<Tuple> getValues(); void addValues(Set<Tuple> values); void addValue(Tuple value); boolean isResolved(); void resolve(); void unresolve();... | EdgeGroup { public String getOrderedEdgeNames() { return orderedEdgeNames; } EdgeGroup(Set<LabeledEdge<String>> edges); Set<String> getEdgeNames(); String getOrderedEdgeNames(); Set<Tuple> getValues(); void addValues(Set<Tuple> values); void addValue(Tuple value); boolean isResolved(); void resolve(); void unresolve();... |
@Test public void testPersistDataStore() { IDataStore dataStore = Mockito.mock(IDataStore.class); IMetaData metaData = Mockito.mock(IMetaData.class); IRecord record = Mockito.mock(IRecord.class); IField fieldInt = Mockito.mock(IField.class); IField fieldStr = Mockito.mock(IField.class); Mockito.when(dataStore.getMetaDa... | public Object persistDataStore(IDataStore dataStore, String fileName, String folderName) { FSDataOutputStream fsOS = openHdfsFile(fileName, folderName); IMetaData mt = dataStore.getMetaData(); int nFields = mt.getFieldCount(); try { logger.debug("Starting writing the DataSet metadata"); for (int f = 0; f < nFields; f++... | PersistedHDFSManager implements IPersistedManager { public Object persistDataStore(IDataStore dataStore, String fileName, String folderName) { FSDataOutputStream fsOS = openHdfsFile(fileName, folderName); IMetaData mt = dataStore.getMetaData(); int nFields = mt.getFieldCount(); try { logger.debug("Starting writing the ... | PersistedHDFSManager implements IPersistedManager { public Object persistDataStore(IDataStore dataStore, String fileName, String folderName) { FSDataOutputStream fsOS = openHdfsFile(fileName, folderName); IMetaData mt = dataStore.getMetaData(); int nFields = mt.getFieldCount(); try { logger.debug("Starting writing the ... | PersistedHDFSManager implements IPersistedManager { public Object persistDataStore(IDataStore dataStore, String fileName, String folderName) { FSDataOutputStream fsOS = openHdfsFile(fileName, folderName); IMetaData mt = dataStore.getMetaData(); int nFields = mt.getFieldCount(); try { logger.debug("Starting writing the ... | PersistedHDFSManager implements IPersistedManager { public Object persistDataStore(IDataStore dataStore, String fileName, String folderName) { FSDataOutputStream fsOS = openHdfsFile(fileName, folderName); IMetaData mt = dataStore.getMetaData(); int nFields = mt.getFieldCount(); try { logger.debug("Starting writing the ... |
@Ignore @Test public void testGetParamsDefaultValuesUseAlsoService() throws Exception { UtilitiesForTest.setUpTestJNDI(); EnginConf.setTestconfigInputstream(new FileInputStream("resources-test/engine-config.xml")); UtilitiesForTest.writeSessionOfWebApp(); HttpSession session = UtilitiesForTest.getSession(); MockDataSet... | public static Map<String, ParamDefaultValue> getParamsDefaultValuesUseAlsoService(IDataSet dataSet, String user, HttpSession session) { Helper.checkNotNull(dataSet, "dataSet"); Helper.checkNotNull(session, "session"); Helper.checkNotNullNotTrimNotEmpty(user, "user"); Map<String, ParamDefaultValue> res = getParamsDefaul... | DataSetUtilities { public static Map<String, ParamDefaultValue> getParamsDefaultValuesUseAlsoService(IDataSet dataSet, String user, HttpSession session) { Helper.checkNotNull(dataSet, "dataSet"); Helper.checkNotNull(session, "session"); Helper.checkNotNullNotTrimNotEmpty(user, "user"); Map<String, ParamDefaultValue> re... | DataSetUtilities { public static Map<String, ParamDefaultValue> getParamsDefaultValuesUseAlsoService(IDataSet dataSet, String user, HttpSession session) { Helper.checkNotNull(dataSet, "dataSet"); Helper.checkNotNull(session, "session"); Helper.checkNotNullNotTrimNotEmpty(user, "user"); Map<String, ParamDefaultValue> re... | DataSetUtilities { public static Map<String, ParamDefaultValue> getParamsDefaultValuesUseAlsoService(IDataSet dataSet, String user, HttpSession session) { Helper.checkNotNull(dataSet, "dataSet"); Helper.checkNotNull(session, "session"); Helper.checkNotNullNotTrimNotEmpty(user, "user"); Map<String, ParamDefaultValue> re... | DataSetUtilities { public static Map<String, ParamDefaultValue> getParamsDefaultValuesUseAlsoService(IDataSet dataSet, String user, HttpSession session) { Helper.checkNotNull(dataSet, "dataSet"); Helper.checkNotNull(session, "session"); Helper.checkNotNullNotTrimNotEmpty(user, "user"); Map<String, ParamDefaultValue> re... |
@Test public void testGetParamsDefaultValues() { IDataSet dataSet = new MockDataSet(); dataSet.setParameters(DataSetParametersListTest.XML); Map<String, ParamDefaultValue> pdvs = DataSetUtilities.getParamsDefaultValues(dataSet); checkParams(pdvs); } | @SuppressWarnings("unchecked") public static Map<String, ParamDefaultValue> getParamsDefaultValues(IDataSet dataSet) { Helper.checkNotNull(dataSet, "dataSet"); try { String params = dataSet.getParameters(); if (params == null || params.isEmpty()) { return null; } Map<String, ParamDefaultValue> res = new HashMap<String,... | DataSetUtilities { @SuppressWarnings("unchecked") public static Map<String, ParamDefaultValue> getParamsDefaultValues(IDataSet dataSet) { Helper.checkNotNull(dataSet, "dataSet"); try { String params = dataSet.getParameters(); if (params == null || params.isEmpty()) { return null; } Map<String, ParamDefaultValue> res = ... | DataSetUtilities { @SuppressWarnings("unchecked") public static Map<String, ParamDefaultValue> getParamsDefaultValues(IDataSet dataSet) { Helper.checkNotNull(dataSet, "dataSet"); try { String params = dataSet.getParameters(); if (params == null || params.isEmpty()) { return null; } Map<String, ParamDefaultValue> res = ... | DataSetUtilities { @SuppressWarnings("unchecked") public static Map<String, ParamDefaultValue> getParamsDefaultValues(IDataSet dataSet) { Helper.checkNotNull(dataSet, "dataSet"); try { String params = dataSet.getParameters(); if (params == null || params.isEmpty()) { return null; } Map<String, ParamDefaultValue> res = ... | DataSetUtilities { @SuppressWarnings("unchecked") public static Map<String, ParamDefaultValue> getParamsDefaultValues(IDataSet dataSet) { Helper.checkNotNull(dataSet, "dataSet"); try { String params = dataSet.getParameters(); if (params == null || params.isEmpty()) { return null; } Map<String, ParamDefaultValue> res = ... |
@SuppressWarnings({ "unchecked", "rawtypes" }) @Test public void testFillDefaultValues() { IDataSet dataSet = new MockDataSet(); dataSet.setParameters(DataSetParametersListTest.XML); Map parameters = new HashMap<String, String>(); parameters.put(DataSetParametersListTest.FIRST_PARAM, "a"); parameters.put(DataSetParamet... | @SuppressWarnings({ "rawtypes", "unchecked" }) public static void fillDefaultValues(IDataSet dataSet, Map parameters) { if (disableDefaultParams) { return; } Helper.checkNotNull(dataSet, "dataset"); if (parameters == null) { return; } int oldSize = parameters.size(); Map<String, ParamDefaultValue> defaultValues = getPa... | DataSetUtilities { @SuppressWarnings({ "rawtypes", "unchecked" }) public static void fillDefaultValues(IDataSet dataSet, Map parameters) { if (disableDefaultParams) { return; } Helper.checkNotNull(dataSet, "dataset"); if (parameters == null) { return; } int oldSize = parameters.size(); Map<String, ParamDefaultValue> de... | DataSetUtilities { @SuppressWarnings({ "rawtypes", "unchecked" }) public static void fillDefaultValues(IDataSet dataSet, Map parameters) { if (disableDefaultParams) { return; } Helper.checkNotNull(dataSet, "dataset"); if (parameters == null) { return; } int oldSize = parameters.size(); Map<String, ParamDefaultValue> de... | DataSetUtilities { @SuppressWarnings({ "rawtypes", "unchecked" }) public static void fillDefaultValues(IDataSet dataSet, Map parameters) { if (disableDefaultParams) { return; } Helper.checkNotNull(dataSet, "dataset"); if (parameters == null) { return; } int oldSize = parameters.size(); Map<String, ParamDefaultValue> de... | DataSetUtilities { @SuppressWarnings({ "rawtypes", "unchecked" }) public static void fillDefaultValues(IDataSet dataSet, Map parameters) { if (disableDefaultParams) { return; } Helper.checkNotNull(dataSet, "dataset"); if (parameters == null) { return; } int oldSize = parameters.size(); Map<String, ParamDefaultValue> de... |
@Test public void testLoadFromXML() throws SourceBeanException { DataSetParametersList dspl = new DataSetParametersList(); dspl.loadFromXML(XML); checkParams(dspl); } | public void loadFromXML(String dataDefinition) throws SourceBeanException { logger.debug("IN"); dataDefinition.trim(); InputSource stream = new InputSource(new StringReader(dataDefinition)); SourceBean source = SourceBean.fromXMLStream(stream); if (!source.getName().equals("PARAMETERSLIST")) { SourceBean wrapper = new ... | DataSetParametersList { public void loadFromXML(String dataDefinition) throws SourceBeanException { logger.debug("IN"); dataDefinition.trim(); InputSource stream = new InputSource(new StringReader(dataDefinition)); SourceBean source = SourceBean.fromXMLStream(stream); if (!source.getName().equals("PARAMETERSLIST")) { S... | DataSetParametersList { public void loadFromXML(String dataDefinition) throws SourceBeanException { logger.debug("IN"); dataDefinition.trim(); InputSource stream = new InputSource(new StringReader(dataDefinition)); SourceBean source = SourceBean.fromXMLStream(stream); if (!source.getName().equals("PARAMETERSLIST")) { S... | DataSetParametersList { public void loadFromXML(String dataDefinition) throws SourceBeanException { logger.debug("IN"); dataDefinition.trim(); InputSource stream = new InputSource(new StringReader(dataDefinition)); SourceBean source = SourceBean.fromXMLStream(stream); if (!source.getName().equals("PARAMETERSLIST")) { S... | DataSetParametersList { public void loadFromXML(String dataDefinition) throws SourceBeanException { logger.debug("IN"); dataDefinition.trim(); InputSource stream = new InputSource(new StringReader(dataDefinition)); SourceBean source = SourceBean.fromXMLStream(stream); if (!source.getName().equals("PARAMETERSLIST")) { S... |
@Test public void testToXML() { DataSetParametersList dspl = new DataSetParametersList(); dspl.add(FIRST_PARAM, "string"); dspl.add(SECOND_PARAM, "number"); String xml = dspl.toXML(); assertEquals( "<PARAMETERSLIST><ROWS><ROW NAME=\"firstParam\" TYPE=\"string\" DEFAULT_VALUE=\"\" /><ROW NAME=\"secondParam\" TYPE=\"numb... | public String toXML() { logger.debug("IN"); String lovXML = ""; lovXML += "<PARAMETERSLIST>"; lovXML += "<ROWS>"; DataSetParameterItem lov = null; Iterator iter = items.iterator(); while (iter.hasNext()) { lov = (DataSetParameterItem) iter.next(); String name = lov.getName(); String type = lov.getType(); String default... | DataSetParametersList { public String toXML() { logger.debug("IN"); String lovXML = ""; lovXML += "<PARAMETERSLIST>"; lovXML += "<ROWS>"; DataSetParameterItem lov = null; Iterator iter = items.iterator(); while (iter.hasNext()) { lov = (DataSetParameterItem) iter.next(); String name = lov.getName(); String type = lov.g... | DataSetParametersList { public String toXML() { logger.debug("IN"); String lovXML = ""; lovXML += "<PARAMETERSLIST>"; lovXML += "<ROWS>"; DataSetParameterItem lov = null; Iterator iter = items.iterator(); while (iter.hasNext()) { lov = (DataSetParameterItem) iter.next(); String name = lov.getName(); String type = lov.g... | DataSetParametersList { public String toXML() { logger.debug("IN"); String lovXML = ""; lovXML += "<PARAMETERSLIST>"; lovXML += "<ROWS>"; DataSetParameterItem lov = null; Iterator iter = items.iterator(); while (iter.hasNext()) { lov = (DataSetParameterItem) iter.next(); String name = lov.getName(); String type = lov.g... | DataSetParametersList { public String toXML() { logger.debug("IN"); String lovXML = ""; lovXML += "<PARAMETERSLIST>"; lovXML += "<ROWS>"; DataSetParameterItem lov = null; Iterator iter = items.iterator(); while (iter.hasNext()) { lov = (DataSetParameterItem) iter.next(); String name = lov.getName(); String type = lov.g... |
@Test public void testGetStackTraceAsString() { Exception mockException = mock(Exception.class); when(mockException.toString()).thenReturn("Mocked Exception"); when(mockException.getStackTrace()).thenReturn(new StackTraceElement[]{ new StackTraceElement("String","toString()","testfile",123), new StackTraceElement("Test... | public static String getStackTraceAsString( Exception aException ){ String vStackTrace = "\t" + aException.toString() + "\n"; for( StackTraceElement vElement : aException.getStackTrace() ){ vStackTrace += "\t\t" + vElement.toString() + "\n"; } return vStackTrace; } | ExceptionUtilities { public static String getStackTraceAsString( Exception aException ){ String vStackTrace = "\t" + aException.toString() + "\n"; for( StackTraceElement vElement : aException.getStackTrace() ){ vStackTrace += "\t\t" + vElement.toString() + "\n"; } return vStackTrace; } } | ExceptionUtilities { public static String getStackTraceAsString( Exception aException ){ String vStackTrace = "\t" + aException.toString() + "\n"; for( StackTraceElement vElement : aException.getStackTrace() ){ vStackTrace += "\t\t" + vElement.toString() + "\n"; } return vStackTrace; } } | ExceptionUtilities { public static String getStackTraceAsString( Exception aException ){ String vStackTrace = "\t" + aException.toString() + "\n"; for( StackTraceElement vElement : aException.getStackTrace() ){ vStackTrace += "\t\t" + vElement.toString() + "\n"; } return vStackTrace; } static String getStackTraceAsStr... | ExceptionUtilities { public static String getStackTraceAsString( Exception aException ){ String vStackTrace = "\t" + aException.toString() + "\n"; for( StackTraceElement vElement : aException.getStackTrace() ){ vStackTrace += "\t\t" + vElement.toString() + "\n"; } return vStackTrace; } static String getStackTraceAsStr... |
@Test public void testGetInstance() { ToServerManagement vSaveToCompare = ToServerManagement.getInstance(); assertThat(vSaveToCompare).isInstanceOf(ToServerManagement.class); assertThat(vSaveToCompare).isEqualTo(ToServerManagement.getInstance()); } | public static ToServerManagement getInstance() { if( ToServerManagement.sINSTANCE == null){ ToServerManagement.sINSTANCE = new ToServerManagement(); } return ToServerManagement.sINSTANCE; } | ToServerManagement extends Thread { public static ToServerManagement getInstance() { if( ToServerManagement.sINSTANCE == null){ ToServerManagement.sINSTANCE = new ToServerManagement(); } return ToServerManagement.sINSTANCE; } } | ToServerManagement extends Thread { public static ToServerManagement getInstance() { if( ToServerManagement.sINSTANCE == null){ ToServerManagement.sINSTANCE = new ToServerManagement(); } return ToServerManagement.sINSTANCE; } ToServerManagement(); } | ToServerManagement extends Thread { public static ToServerManagement getInstance() { if( ToServerManagement.sINSTANCE == null){ ToServerManagement.sINSTANCE = new ToServerManagement(); } return ToServerManagement.sINSTANCE; } ToServerManagement(); static ToServerManagement getInstance(); void close(); void resumeManage... | ToServerManagement extends Thread { public static ToServerManagement getInstance() { if( ToServerManagement.sINSTANCE == null){ ToServerManagement.sINSTANCE = new ToServerManagement(); } return ToServerManagement.sINSTANCE; } ToServerManagement(); static ToServerManagement getInstance(); void close(); void resumeManage... |
@Test public void testStopManagementWhenNotAlive() { assertThat(mSUT.isAlive()).isFalse(); mSUT.stopManagement(); assertThat(mSUT.isAlive()).isFalse(); verify(mLoggerMock, never()).info("ToServerManagement stopped."); } | public void stopManagement(){ synchronized (this) { mManageMessagesToServer = false; } if( isAlive()){ resumeManagement(); while(isAlive()){ try { Thread.sleep( 10 ); } catch ( Exception vException ) { Core.getLogger().error( "Error stopping ToServerManagement.", vException ); } } Core.getLogger().info( "ToServerManage... | ToServerManagement extends Thread { public void stopManagement(){ synchronized (this) { mManageMessagesToServer = false; } if( isAlive()){ resumeManagement(); while(isAlive()){ try { Thread.sleep( 10 ); } catch ( Exception vException ) { Core.getLogger().error( "Error stopping ToServerManagement.", vException ); } } Co... | ToServerManagement extends Thread { public void stopManagement(){ synchronized (this) { mManageMessagesToServer = false; } if( isAlive()){ resumeManagement(); while(isAlive()){ try { Thread.sleep( 10 ); } catch ( Exception vException ) { Core.getLogger().error( "Error stopping ToServerManagement.", vException ); } } Co... | ToServerManagement extends Thread { public void stopManagement(){ synchronized (this) { mManageMessagesToServer = false; } if( isAlive()){ resumeManagement(); while(isAlive()){ try { Thread.sleep( 10 ); } catch ( Exception vException ) { Core.getLogger().error( "Error stopping ToServerManagement.", vException ); } } Co... | ToServerManagement extends Thread { public void stopManagement(){ synchronized (this) { mManageMessagesToServer = false; } if( isAlive()){ resumeManagement(); while(isAlive()){ try { Thread.sleep( 10 ); } catch ( Exception vException ) { Core.getLogger().error( "Error stopping ToServerManagement.", vException ); } } Co... |
@Test public void testIsSendingMessagesWhenNotAlive() { assertThat(mSUT.isAlive()).isFalse(); assertThat(mSUT.isSendingMessages()).isFalse(); } | public boolean isSendingMessages(){ return isAlive() && (System.currentTimeMillis() - mLastSendMessage.get() ) < 100; } | ToServerManagement extends Thread { public boolean isSendingMessages(){ return isAlive() && (System.currentTimeMillis() - mLastSendMessage.get() ) < 100; } } | ToServerManagement extends Thread { public boolean isSendingMessages(){ return isAlive() && (System.currentTimeMillis() - mLastSendMessage.get() ) < 100; } ToServerManagement(); } | ToServerManagement extends Thread { public boolean isSendingMessages(){ return isAlive() && (System.currentTimeMillis() - mLastSendMessage.get() ) < 100; } ToServerManagement(); static ToServerManagement getInstance(); void close(); void resumeManagement(); boolean isSuspended(); void suspendManagement(); @Override voi... | ToServerManagement extends Thread { public boolean isSendingMessages(){ return isAlive() && (System.currentTimeMillis() - mLastSendMessage.get() ) < 100; } ToServerManagement(); static ToServerManagement getInstance(); void close(); void resumeManagement(); boolean isSuspended(); void suspendManagement(); @Override voi... |
@Test public void testSendMessagesWithAI() throws Exception { when(mCoreMock.getServerConnection()).thenReturn( mNetworkCommunicationMock ); when(mCoreMock.getAI()).thenReturn( mArtificialIntelligenceMock ); when(mArtificialIntelligenceMock.getAction()).thenAnswer(new Answer<Action>() { @Override public Action answer(I... | public void startManagement(){ if( Core.getInstance().getServerConnection() == null ) { throw new NullPointerException( "NetworkCommunication cannot be NULL when starting ToServerManagement." ) ; } else if ( isAlive() ){ throw new IllegalThreadStateException( "ToServerManagement can not be started again." ); } else { s... | ToServerManagement extends Thread { public void startManagement(){ if( Core.getInstance().getServerConnection() == null ) { throw new NullPointerException( "NetworkCommunication cannot be NULL when starting ToServerManagement." ) ; } else if ( isAlive() ){ throw new IllegalThreadStateException( "ToServerManagement can ... | ToServerManagement extends Thread { public void startManagement(){ if( Core.getInstance().getServerConnection() == null ) { throw new NullPointerException( "NetworkCommunication cannot be NULL when starting ToServerManagement." ) ; } else if ( isAlive() ){ throw new IllegalThreadStateException( "ToServerManagement can ... | ToServerManagement extends Thread { public void startManagement(){ if( Core.getInstance().getServerConnection() == null ) { throw new NullPointerException( "NetworkCommunication cannot be NULL when starting ToServerManagement." ) ; } else if ( isAlive() ){ throw new IllegalThreadStateException( "ToServerManagement can ... | ToServerManagement extends Thread { public void startManagement(){ if( Core.getInstance().getServerConnection() == null ) { throw new NullPointerException( "NetworkCommunication cannot be NULL when starting ToServerManagement." ) ; } else if ( isAlive() ){ throw new IllegalThreadStateException( "ToServerManagement can ... |
@Test public void testSendNullMessagesWithAI() throws Exception { when(mCoreMock.getServerConnection()).thenReturn( mNetworkCommunicationMock ); when(mCoreMock.getAI()).thenReturn( mArtificialIntelligenceMock ); when(mArtificialIntelligenceMock.getAction()).thenAnswer(new Answer<Action>() { @Override public Action answ... | public void startManagement(){ if( Core.getInstance().getServerConnection() == null ) { throw new NullPointerException( "NetworkCommunication cannot be NULL when starting ToServerManagement." ) ; } else if ( isAlive() ){ throw new IllegalThreadStateException( "ToServerManagement can not be started again." ); } else { s... | ToServerManagement extends Thread { public void startManagement(){ if( Core.getInstance().getServerConnection() == null ) { throw new NullPointerException( "NetworkCommunication cannot be NULL when starting ToServerManagement." ) ; } else if ( isAlive() ){ throw new IllegalThreadStateException( "ToServerManagement can ... | ToServerManagement extends Thread { public void startManagement(){ if( Core.getInstance().getServerConnection() == null ) { throw new NullPointerException( "NetworkCommunication cannot be NULL when starting ToServerManagement." ) ; } else if ( isAlive() ){ throw new IllegalThreadStateException( "ToServerManagement can ... | ToServerManagement extends Thread { public void startManagement(){ if( Core.getInstance().getServerConnection() == null ) { throw new NullPointerException( "NetworkCommunication cannot be NULL when starting ToServerManagement." ) ; } else if ( isAlive() ){ throw new IllegalThreadStateException( "ToServerManagement can ... | ToServerManagement extends Thread { public void startManagement(){ if( Core.getInstance().getServerConnection() == null ) { throw new NullPointerException( "NetworkCommunication cannot be NULL when starting ToServerManagement." ) ; } else if ( isAlive() ){ throw new IllegalThreadStateException( "ToServerManagement can ... |
@Test public void testLoseServerConnectionWhileSendingMessages() throws Exception { when(mCoreMock.getServerConnection()).thenReturn( mNetworkCommunicationMock ); when(mCoreMock.getAI()).thenReturn( mArtificialIntelligenceMock ); when(mArtificialIntelligenceMock.getAction()).thenAnswer(new Answer<Action>() { @Override ... | public void startManagement(){ if( Core.getInstance().getServerConnection() == null ) { throw new NullPointerException( "NetworkCommunication cannot be NULL when starting ToServerManagement." ) ; } else if ( isAlive() ){ throw new IllegalThreadStateException( "ToServerManagement can not be started again." ); } else { s... | ToServerManagement extends Thread { public void startManagement(){ if( Core.getInstance().getServerConnection() == null ) { throw new NullPointerException( "NetworkCommunication cannot be NULL when starting ToServerManagement." ) ; } else if ( isAlive() ){ throw new IllegalThreadStateException( "ToServerManagement can ... | ToServerManagement extends Thread { public void startManagement(){ if( Core.getInstance().getServerConnection() == null ) { throw new NullPointerException( "NetworkCommunication cannot be NULL when starting ToServerManagement." ) ; } else if ( isAlive() ){ throw new IllegalThreadStateException( "ToServerManagement can ... | ToServerManagement extends Thread { public void startManagement(){ if( Core.getInstance().getServerConnection() == null ) { throw new NullPointerException( "NetworkCommunication cannot be NULL when starting ToServerManagement." ) ; } else if ( isAlive() ){ throw new IllegalThreadStateException( "ToServerManagement can ... | ToServerManagement extends Thread { public void startManagement(){ if( Core.getInstance().getServerConnection() == null ) { throw new NullPointerException( "NetworkCommunication cannot be NULL when starting ToServerManagement." ) ; } else if ( isAlive() ){ throw new IllegalThreadStateException( "ToServerManagement can ... |
@Test public void testEqualsWithDifferentRightWheelVelocity() { Movement movement1 = new Movement(51,50); Movement movement2 = new Movement(49,50); assertThat(movement1.equals(movement2)).isEqualTo(false); } | @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Movement other = (Movement) obj; if (mLeftWheelVelocity != other.mLeftWheelVelocity) return false; if (mRightWheelVelocity != other.mRightWheelVelocity) return false... | Movement implements Action { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Movement other = (Movement) obj; if (mLeftWheelVelocity != other.mLeftWheelVelocity) return false; if (mRightWheelVelocity != other.mRig... | Movement implements Action { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Movement other = (Movement) obj; if (mLeftWheelVelocity != other.mLeftWheelVelocity) return false; if (mRightWheelVelocity != other.mRig... | Movement implements Action { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Movement other = (Movement) obj; if (mLeftWheelVelocity != other.mLeftWheelVelocity) return false; if (mRightWheelVelocity != other.mRig... | Movement implements Action { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Movement other = (Movement) obj; if (mLeftWheelVelocity != other.mLeftWheelVelocity) return false; if (mRightWheelVelocity != other.mRig... |
@Test public void testEqualsWithSameValues() { Movement movement1 = new Movement(50,50); Movement movement2 = new Movement(50,50); assertThat(movement1.equals(movement2)).isEqualTo(true); } | @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Movement other = (Movement) obj; if (mLeftWheelVelocity != other.mLeftWheelVelocity) return false; if (mRightWheelVelocity != other.mRightWheelVelocity) return false... | Movement implements Action { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Movement other = (Movement) obj; if (mLeftWheelVelocity != other.mLeftWheelVelocity) return false; if (mRightWheelVelocity != other.mRig... | Movement implements Action { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Movement other = (Movement) obj; if (mLeftWheelVelocity != other.mLeftWheelVelocity) return false; if (mRightWheelVelocity != other.mRig... | Movement implements Action { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Movement other = (Movement) obj; if (mLeftWheelVelocity != other.mLeftWheelVelocity) return false; if (mRightWheelVelocity != other.mRig... | Movement implements Action { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Movement other = (Movement) obj; if (mLeftWheelVelocity != other.mLeftWheelVelocity) return false; if (mRightWheelVelocity != other.mRig... |
@Test public void setBallPositionTest() { BallPosition bp = new BallPosition(30, 40, true); rawWorldDataSpy.setBallPosition(bp); assert(rawWorldDataSpy.getBallPosition().equals(bp)); } | public void setBallPosition(BallPosition ballPos){ mBallPosition = ballPos != null ? ballPos : new BallPosition(); } | RawWorldData implements WorldData { public void setBallPosition(BallPosition ballPos){ mBallPosition = ballPos != null ? ballPos : new BallPosition(); } } | RawWorldData implements WorldData { public void setBallPosition(BallPosition ballPos){ mBallPosition = ballPos != null ? ballPos : new BallPosition(); } } | RawWorldData implements WorldData { public void setBallPosition(BallPosition ballPos){ mBallPosition = ballPos != null ? ballPos : new BallPosition(); } static RawWorldData createRawWorldDataFromXML( String aXMLData ); @XmlTransient double getPlayTime(); @XmlTransient PlayMode getPlayMode(); @XmlTransient Score getSco... | RawWorldData implements WorldData { public void setBallPosition(BallPosition ballPos){ mBallPosition = ballPos != null ? ballPos : new BallPosition(); } static RawWorldData createRawWorldDataFromXML( String aXMLData ); @XmlTransient double getPlayTime(); @XmlTransient PlayMode getPlayMode(); @XmlTransient Score getSco... |
@Test public void getReferencePointsTest() { List<ReferencePoint> refPoints = rawWorldData.getReferencePoints(); assert(refPoints==null); } | @XmlTransient public List<ReferencePoint> getReferencePoints() { return mReferencePoints; } | RawWorldData implements WorldData { @XmlTransient public List<ReferencePoint> getReferencePoints() { return mReferencePoints; } } | RawWorldData implements WorldData { @XmlTransient public List<ReferencePoint> getReferencePoints() { return mReferencePoints; } } | RawWorldData implements WorldData { @XmlTransient public List<ReferencePoint> getReferencePoints() { return mReferencePoints; } static RawWorldData createRawWorldDataFromXML( String aXMLData ); @XmlTransient double getPlayTime(); @XmlTransient PlayMode getPlayMode(); @XmlTransient Score getScore(); @XmlTransient int g... | RawWorldData implements WorldData { @XmlTransient public List<ReferencePoint> getReferencePoints() { return mReferencePoints; } static RawWorldData createRawWorldDataFromXML( String aXMLData ); @XmlTransient double getPlayTime(); @XmlTransient PlayMode getPlayMode(); @XmlTransient Score getScore(); @XmlTransient int g... |
@Test public void getReferencePointTestNA() { ReferencePoint mockedBottomCenter = mock(ReferencePoint.class); rawWorldData.mReferencePoints = new ArrayList<>(); rawWorldData.mReferencePoints.add(0, new ReferencePoint()); rawWorldData.mReferencePoints.add(0, new ReferencePoint()); when(mockedBottomCenter.getPointName())... | public ReferencePoint getReferencePoint( ReferencePointName aName ) { if( mReferencePoints.get( aName.getPosition() ).getPointName() == aName ){ return mReferencePoints.get( aName.getPosition() ); } for( ReferencePoint vPoint : mReferencePoints ){ if( vPoint.getPointName() == aName ){ return vPoint; } } return null; } | RawWorldData implements WorldData { public ReferencePoint getReferencePoint( ReferencePointName aName ) { if( mReferencePoints.get( aName.getPosition() ).getPointName() == aName ){ return mReferencePoints.get( aName.getPosition() ); } for( ReferencePoint vPoint : mReferencePoints ){ if( vPoint.getPointName() == aName )... | RawWorldData implements WorldData { public ReferencePoint getReferencePoint( ReferencePointName aName ) { if( mReferencePoints.get( aName.getPosition() ).getPointName() == aName ){ return mReferencePoints.get( aName.getPosition() ); } for( ReferencePoint vPoint : mReferencePoints ){ if( vPoint.getPointName() == aName )... | RawWorldData implements WorldData { public ReferencePoint getReferencePoint( ReferencePointName aName ) { if( mReferencePoints.get( aName.getPosition() ).getPointName() == aName ){ return mReferencePoints.get( aName.getPosition() ); } for( ReferencePoint vPoint : mReferencePoints ){ if( vPoint.getPointName() == aName )... | RawWorldData implements WorldData { public ReferencePoint getReferencePoint( ReferencePointName aName ) { if( mReferencePoints.get( aName.getPosition() ).getPointName() == aName ){ return mReferencePoints.get( aName.getPosition() ); } for( ReferencePoint vPoint : mReferencePoints ){ if( vPoint.getPointName() == aName )... |
@Test public void equalsTestEqual() { fellowPlayerCompare = new FellowPlayer(5, "Bob", true, 130.7, 70.3, 0); assert(fellowPlayerOriginal.equals(fellowPlayerCompare)); } | @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.equals(other.mNickname)) return false; ... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... |
@Test public void equalsTestSameInstance() { assert(fellowPlayerOriginal.equals(fellowPlayerOriginal)); } | @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.equals(other.mNickname)) return false; ... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... |
@Test public void equalsTestWrongClass() { RawWorldData rwd = new RawWorldData(); assert(!fellowPlayerOriginal.equals(rwd)); } | @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.equals(other.mNickname)) return false; ... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... |
@Test public void equalsTestWrongID() { fellowPlayerCompare = new FellowPlayer(6, "Bob", true, 130.7, 70.3, 0); assert(!fellowPlayerOriginal.equals(fellowPlayerCompare)); } | @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.equals(other.mNickname)) return false; ... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... |
@Test public void equalsTestWrongName() { fellowPlayerCompare = new FellowPlayer(5, "Bill", true, 130.7, 70.3, 0); assert(!fellowPlayerOriginal.equals(fellowPlayerCompare)); } | @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.equals(other.mNickname)) return false; ... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... |
@Test public void testGetAllGamevalueNamesAsAString() { String gvString = new String(); for ( BotInformation.GamevalueNames vGamevalueName : BotInformation.GamevalueNames.values() ) { gvString += vGamevalueName.toString() + " "; } assertThat(BotInformation.GamevalueNames.getAllGamevalueNamesAsAString()).isEqualTo(gvStr... | public synchronized String toString() { String vBotInformationString = "Bot " + getBotname() + "(" + getRcId() + "/" + getVtId() + ")\n"; vBotInformationString += "with Address: " + getBotIP().toString() + " Port: " + getBotPort(); vBotInformationString += getReconnect()?" (Reconnected)":"" + "\n"; vBotInformationStrin... | BotInformation implements Serializable { public synchronized String toString() { String vBotInformationString = "Bot " + getBotname() + "(" + getRcId() + "/" + getVtId() + ")\n"; vBotInformationString += "with Address: " + getBotIP().toString() + " Port: " + getBotPort(); vBotInformationString += getReconnect()?" (Reco... | BotInformation implements Serializable { public synchronized String toString() { String vBotInformationString = "Bot " + getBotname() + "(" + getRcId() + "/" + getVtId() + ")\n"; vBotInformationString += "with Address: " + getBotIP().toString() + " Port: " + getBotPort(); vBotInformationString += getReconnect()?" (Reco... | BotInformation implements Serializable { public synchronized String toString() { String vBotInformationString = "Bot " + getBotname() + "(" + getRcId() + "/" + getVtId() + ")\n"; vBotInformationString += "with Address: " + getBotIP().toString() + " Port: " + getBotPort(); vBotInformationString += getReconnect()?" (Reco... | BotInformation implements Serializable { public synchronized String toString() { String vBotInformationString = "Bot " + getBotname() + "(" + getRcId() + "/" + getVtId() + ")\n"; vBotInformationString += "with Address: " + getBotIP().toString() + " Port: " + getBotPort(); vBotInformationString += getReconnect()?" (Reco... |
@Test public void equalsTestWrongStatus() { fellowPlayerCompare = new FellowPlayer(5, "Bob", false, 130.7, 70.3, 0); assert(!fellowPlayerOriginal.equals(fellowPlayerCompare)); } | @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.equals(other.mNickname)) return false; ... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... |
@Test public void equalsTestWrongDistance() { fellowPlayerCompare = new FellowPlayer(5, "Bob", true, 130.8, 70.3, 0); assert(!fellowPlayerOriginal.equals(fellowPlayerCompare)); } | @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.equals(other.mNickname)) return false; ... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... |
@Test public void equalsTestWrongAngle() { fellowPlayerCompare = new FellowPlayer(5, "Bob", true, 130.7, 70.4, 0); assert(!fellowPlayerOriginal.equals(fellowPlayerCompare)); } | @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.equals(other.mNickname)) return false; ... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... |
@Test public void equalsTestWrongOrientation() { fellowPlayerCompare = new FellowPlayer(5, "Bob", true, 130.7, 70.3, 0.2); assert(!fellowPlayerOriginal.equals(fellowPlayerCompare)); } | @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.equals(other.mNickname)) return false; ... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... |
@Test public void equalsTestNoNickname() { fellowPlayerCompare = new FellowPlayer(5, null, true, 130.7, 70.3, 0); assert(!fellowPlayerOriginal.equals(fellowPlayerCompare)); } | @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.equals(other.mNickname)) return false; ... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... |
@Test public void equalsTestNoNicknameSwitched() { fellowPlayerCompare = new FellowPlayer(5, null, true, 130.7, 70.3, 0); assert(!fellowPlayerCompare.equals(fellowPlayerOriginal)); } | @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.equals(other.mNickname)) return false; ... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... |
@Test public void equalsTestNoNicknameBoth() { fellowPlayerCompare = new FellowPlayer(5, null, true, 130.7, 70.3, 0); FellowPlayer fellowPlayerOriginalLocal = new FellowPlayer(5, null, true, 130.7, 70.3, 0); assert(fellowPlayerOriginalLocal.equals(fellowPlayerCompare)); } | @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.equals(other.mNickname)) return false; ... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... |
@Test public void equalsTestNoStatus() { fellowPlayerCompare = new FellowPlayer(5, "Bob", null, 130.7, 70.3, 0); assert(!fellowPlayerOriginal.equals(fellowPlayerCompare)); } | @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.equals(other.mNickname)) return false; ... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... |
@Test public void equalsTestNoStatusSwitched() { fellowPlayerCompare = new FellowPlayer(5, "Bob", null, 130.7, 70.3, 0); assert(!fellowPlayerCompare.equals(fellowPlayerOriginal)); } | @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.equals(other.mNickname)) return false; ... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... |
@Test public void equalsTestNoStatusBoth() { fellowPlayerCompare = new FellowPlayer(5, "Bob", null, 130.7, 70.3, 0); FellowPlayer fellowPlayerOriginalLocal = new FellowPlayer(5, "Bob", null, 130.7, 70.3, 0); assert(fellowPlayerCompare.equals(fellowPlayerOriginalLocal)); } | @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.equals(other.mNickname)) return false; ... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... | FellowPlayer extends ReferencePoint { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; FellowPlayer other = (FellowPlayer) obj; if (mId != other.mId) return false; if (mNickname == null) { if (other.mNickname != null) return false; } else if (!mNickname.e... |
@Test public void testGetGamevalueNamesAsStringArray() { int i = 0; String[] gvStrings= new String[BotInformation.GamevalueNames.values().length]; for ( BotInformation.GamevalueNames vGamevalueName : BotInformation.GamevalueNames.values() ) { gvStrings[i] = vGamevalueName.toString(); i++; } assertThat(BotInformation.Ga... | public synchronized String toString() { String vBotInformationString = "Bot " + getBotname() + "(" + getRcId() + "/" + getVtId() + ")\n"; vBotInformationString += "with Address: " + getBotIP().toString() + " Port: " + getBotPort(); vBotInformationString += getReconnect()?" (Reconnected)":"" + "\n"; vBotInformationStrin... | BotInformation implements Serializable { public synchronized String toString() { String vBotInformationString = "Bot " + getBotname() + "(" + getRcId() + "/" + getVtId() + ")\n"; vBotInformationString += "with Address: " + getBotIP().toString() + " Port: " + getBotPort(); vBotInformationString += getReconnect()?" (Reco... | BotInformation implements Serializable { public synchronized String toString() { String vBotInformationString = "Bot " + getBotname() + "(" + getRcId() + "/" + getVtId() + ")\n"; vBotInformationString += "with Address: " + getBotIP().toString() + " Port: " + getBotPort(); vBotInformationString += getReconnect()?" (Reco... | BotInformation implements Serializable { public synchronized String toString() { String vBotInformationString = "Bot " + getBotname() + "(" + getRcId() + "/" + getVtId() + ")\n"; vBotInformationString += "with Address: " + getBotIP().toString() + " Port: " + getBotPort(); vBotInformationString += getReconnect()?" (Reco... | BotInformation implements Serializable { public synchronized String toString() { String vBotInformationString = "Bot " + getBotname() + "(" + getRcId() + "/" + getVtId() + ")\n"; vBotInformationString += "with Address: " + getBotIP().toString() + " Port: " + getBotPort(); vBotInformationString += getReconnect()?" (Reco... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.