From 93020dc5444dd281c5675995d7a9472c5bf08f99 Mon Sep 17 00:00:00 2001 From: Andrei Branza Date: Sat, 24 Feb 2024 21:18:38 +0200 Subject: [PATCH] Andrei Branza - converted indents to spaces test classes --- .../baeldung/cloning/deep/DeepCloningTest.java | 18 +++++++++--------- .../cloning/shallow/ShallowCloningTest.java | 16 ++++++++-------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/xxAndreiBranza/shallowCopy-vs-deepCopy/src/test/java/com/baeldung/cloning/deep/DeepCloningTest.java b/xxAndreiBranza/shallowCopy-vs-deepCopy/src/test/java/com/baeldung/cloning/deep/DeepCloningTest.java index 4b9d14fa9c..56bf900f3a 100644 --- a/xxAndreiBranza/shallowCopy-vs-deepCopy/src/test/java/com/baeldung/cloning/deep/DeepCloningTest.java +++ b/xxAndreiBranza/shallowCopy-vs-deepCopy/src/test/java/com/baeldung/cloning/deep/DeepCloningTest.java @@ -7,17 +7,17 @@ import static org.junit.Assert.assertNotEquals; public class DeepCloningTest { - Person alex = new Person("Alex", "Jones", new Address("Main Street", "Main City")); + Person alex = new Person("Alex", "Jones", new Address("Main Street", "Main City")); - @Test - public void whenUsingDeepCopy_thenReferencesAreNotTheSame() - { - Person constructorCopyOfAlex = new Person(alex); + @Test + public void whenUsingDeepCopy_thenReferencesAreNotTheSame() + { + Person constructorCopyOfAlex = new Person(alex); - assertEquals(alex, constructorCopyOfAlex); + assertEquals(alex, constructorCopyOfAlex); - alex.setAddress(new Address("Unknown Street", "Unknown City")); + alex.setAddress(new Address("Unknown Street", "Unknown City")); - assertNotEquals(alex.getAddress(), constructorCopyOfAlex.getAddress()); - } + assertNotEquals(alex.getAddress(), constructorCopyOfAlex.getAddress()); + } } diff --git a/xxAndreiBranza/shallowCopy-vs-deepCopy/src/test/java/com/baeldung/cloning/shallow/ShallowCloningTest.java b/xxAndreiBranza/shallowCopy-vs-deepCopy/src/test/java/com/baeldung/cloning/shallow/ShallowCloningTest.java index b513919911..a52357c5d5 100644 --- a/xxAndreiBranza/shallowCopy-vs-deepCopy/src/test/java/com/baeldung/cloning/shallow/ShallowCloningTest.java +++ b/xxAndreiBranza/shallowCopy-vs-deepCopy/src/test/java/com/baeldung/cloning/shallow/ShallowCloningTest.java @@ -5,17 +5,17 @@ import static org.junit.Assert.*; public class ShallowCloningTest { - Person alex = new Person("Alex", "Jones", new Address("Main Street", "Main City")); + Person alex = new Person("Alex", "Jones", new Address("Main Street", "Main City")); - @Test - public void whenUsingShallowCopy_ThenReferencesAreTheSame() - { + @Test + public void whenUsingShallowCopy_ThenReferencesAreTheSame() + { Person shallowCopyOfAlex = alex.clone(); - assertEquals(alex, shallowCopyOfAlex); + assertEquals(alex, shallowCopyOfAlex); - alex.getAddress().setCityName("Unknown City"); + alex.getAddress().setCityName("Unknown City"); - assertEquals(alex.getAddress(), shallowCopyOfAlex.getAddress()); - } + assertEquals(alex.getAddress(), shallowCopyOfAlex.getAddress()); + } }