BAEL-4399: Changes for removing tab spaces

This commit is contained in:
Amitabh Tiwari 2020-11-04 19:34:50 +05:30
parent 3bea743e5b
commit e13f7952b1
3 changed files with 15 additions and 7 deletions

View File

@ -1,6 +1,8 @@
package com.baeldung.exceptions.nosuchfielderror;
public class Dependent {
// This needed to be commented post compilation of NoSuchFielDError and Compile
public static String message = "Hello Baeldung!!";
}
}

View File

@ -1,16 +1,20 @@
package com.baeldung.exceptions.nosuchfielderror;
public class FieldErrorExample {
public static void main(String... args) {
fetchAndPrint();
}
public static String getDependentMessage() {
return Dependent.message;
}
public static void fetchAndPrint() {
System.out.println(getDependentMessage());
}
}
}

View File

@ -5,10 +5,12 @@ import static org.junit.Assert.assertTrue;
import org.junit.Test;
public class FieldErrorExampleUnitTest {
@Test
public void whenDependentMessage_returnMessage() {
String dependentMessage = FieldErrorExample.getDependentMessage();
assertTrue("Hello Baeldung!!".equals(dependentMessage));
}
}
}