/** @see {@link OpenmrsObjectSaveHandler#handle(OpenmrsObject,User,Date,String)} */ @Test @Verifies( value = "not trim empty strings for AllowLeadingOrTrailingWhitespace annotation", method = "handle(OpenmrsObject,User,Date,String)") public void handle_shouldNotTrimEmptyStringsForAllowLeadingOrTrailingWhitespaceAnnotation() { SomeClass obj = new SomeClass(null, " "); new OpenmrsObjectSaveHandler().handle(obj, null, null, null); Assert.assertNotNull(obj.getDescription()); }
/** @see {@link OpenmrsObjectSaveHandler#handle(OpenmrsObject,User,Date,String)} */ @Test @Verifies( value = "not set empty string properties to null for AllowEmptyStrings annotation", method = "handle(OpenmrsObject,User,Date,String)") public void handle_shouldNotSetEmptyStringPropertiesToNullForAllowEmptyStringsAnnotation() { SomeClass obj = new SomeClass(""); new OpenmrsObjectSaveHandler().handle(obj, null, null, null); Assert.assertNotNull(obj.getName()); }
private int foo3() { if (SomeClass.test(true) == true) if (true) return 4; // Warning, complex block return 0; }
private int foo2() { if (SomeClass.test(true) == true) // Warning, not single-line if-statement return 4; return 0; }
private int foo1() { if (SomeClass.test(true) == true) return 4; int k = 3; // No warning if 'mAllowSingleLineIf' is true return 0; }