-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11771 from hzi-braunschweig/change-8213-enter_hom…
…e_address_existing_persons #8213 - Enter home address for existing persons
- Loading branch information
Showing
8 changed files
with
145 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
sormas-api/src/test/java/de/symeda/sormas/api/utils/LocationHelperTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* SORMAS® - Surveillance Outbreak Response Management & Analysis System | ||
* Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package de.symeda.sormas.api.utils; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertFalse; | ||
import static org.junit.jupiter.api.Assertions.assertTrue; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import de.symeda.sormas.api.infrastructure.continent.ContinentReferenceDto; | ||
import de.symeda.sormas.api.location.LocationDto; | ||
|
||
public class LocationHelperTest { | ||
|
||
@Test | ||
public void testCheckIsEmptyLocation() { | ||
|
||
LocationDto emptyLocation = LocationDto.build(); | ||
assertTrue(LocationHelper.checkIsEmptyLocation(emptyLocation)); | ||
|
||
LocationDto nonEmptyLocation = LocationDto.build(); | ||
nonEmptyLocation.setHouseNumber("12"); | ||
assertFalse(LocationHelper.checkIsEmptyLocation(nonEmptyLocation)); | ||
|
||
nonEmptyLocation.setHouseNumber(""); | ||
assertTrue(LocationHelper.checkIsEmptyLocation(nonEmptyLocation)); | ||
|
||
nonEmptyLocation.setHouseNumber(null); | ||
nonEmptyLocation.setLatitude(14.2342D); | ||
assertFalse(LocationHelper.checkIsEmptyLocation(nonEmptyLocation)); | ||
|
||
nonEmptyLocation.setLatitude(null); | ||
nonEmptyLocation.setContinent(new ContinentReferenceDto()); | ||
assertFalse(LocationHelper.checkIsEmptyLocation(nonEmptyLocation)); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.