Format content with baeldung formatter
This commit is contained in:
parent
c6e1f95e42
commit
8a6e3f233e
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<appender name="STDOUT"
|
||||
class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
|
||||
</pattern>
|
||||
|
|
|
@ -12,16 +12,17 @@ class ShallowDeepCopyUnitTest {
|
|||
Main main = new Main(dependency);
|
||||
Main shallowClone = (Main) main.clone();
|
||||
dependency.setValue(17);
|
||||
assertEquals(17, shallowClone.getDependency().getValue());
|
||||
assertEquals(17, shallowClone.getDependency()
|
||||
.getValue());
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void givenAnObjectAndADependency_whenDeepClonedAndDepencyChanges_ThenDepencyKeepsOldValue() throws Exception {
|
||||
Dependency dependency = new Dependency(13);
|
||||
Main main = new Main(dependency);
|
||||
Main deepClone = (Main) main.deepClone();
|
||||
dependency.setValue(17);
|
||||
assertEquals(13, deepClone.getDependency().getValue());
|
||||
assertEquals(13, deepClone.getDependency()
|
||||
.getValue());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue