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