From ca0ca4bdb2d268ed837dbe780f6d75a0a6063b98 Mon Sep 17 00:00:00 2001 From: hsergiu <57728877+hsergiu@users.noreply.github.com> Date: Sun, 14 Mar 2021 11:30:43 +0200 Subject: [PATCH 1/4] Issue #220:Move deleteBooking from AmenityController to BookingController --- .../main/resources/public/swagger/api.yaml | 24 + dd | 1605 +++++++++++++++++ .../myhome/controllers/AmenityController.java | 12 - .../myhome/controllers/BookingController.java | 29 + .../com/myhome/services/AmenityService.java | 2 - .../com/myhome/services/BookingService.java | 7 + .../springdatajpa/AmenitySDJpaService.java | 12 - .../springdatajpa/BookingSDJpaService.java | 23 + .../controllers/AmenityControllerTest.java | 31 - .../controllers/BookingControllerTest.java | 64 + .../unit/AmenitySDJpaServiceTest.java | 42 - .../unit/BookingSDJpaServiceTest.java | 71 + 12 files changed, 1823 insertions(+), 99 deletions(-) create mode 100644 dd create mode 100644 service/src/main/java/com/myhome/controllers/BookingController.java create mode 100644 service/src/main/java/com/myhome/services/BookingService.java create mode 100644 service/src/main/java/com/myhome/services/springdatajpa/BookingSDJpaService.java create mode 100644 service/src/test/java/com/myhome/controllers/BookingControllerTest.java create mode 100644 service/src/test/java/com/myhome/services/unit/BookingSDJpaServiceTest.java diff --git a/api/src/main/resources/public/swagger/api.yaml b/api/src/main/resources/public/swagger/api.yaml index 47b220be..2c7c766c 100644 --- a/api/src/main/resources/public/swagger/api.yaml +++ b/api/src/main/resources/public/swagger/api.yaml @@ -134,6 +134,30 @@ paths: description: If updated successfully '400': description: If amenity is not found + /amenities/{amenityId}/bookings/{bookingId}: + delete: + security: + - bearerAuth: [ ] + tags: + - Bookings + description: Remove booking + operationId: deleteBooking + parameters: + - in: path + name: amenityId + required: true + schema: + type: string + - in: path + name: bookingId + required: true + schema: + type: string + responses: + '204': + description: If booking deleted + '404': + description: If params are invalid /communities/{communityId}/amenities: get: security: diff --git a/dd b/dd new file mode 100644 index 00000000..34fbb180 --- /dev/null +++ b/dd @@ -0,0 +1,1605 @@ +commit c123298cca0f583728136bb75510c4830ac7702e (HEAD -> master, upstream/master) +Merge: 4a2d165 4b5a837 +Author: Marcin Słowiak +Date: Wed Mar 10 09:48:12 2021 +0100 + + Merge pull request #256 from jmprathab/feature/issue-233--fix-community-tag + + Issue #233: Move endpoints related to amenities from community tag + +commit 4b5a83746704d1a486e395c47922a4209dcc1c6d +Author: JanneSickert +Date: Wed Mar 3 18:34:20 2021 +0100 + + Issue #233: Move endpoints related to amenities from community tag + +commit 4a2d165ad84619ce6f693429fae3e4ea944da215 +Merge: bbaf696 ab64171 +Author: Marcin Słowiak +Date: Sat Mar 6 20:49:18 2021 +0100 + + Merge pull request #254 from hsergiu/feature/issue-231--move-payment-endpoint-from-communities + + Issue #231: Move endpoint related to payments from communities tag to payments + +commit ab64171763311644068e3c0f2e72311d43e75b29 (origin/feature/issue-231--move-payment-endpoint-from-communities, feature/issue-231--move-payment-endpoint-from-communities) +Author: hsergiu <57728877+hsergiu@users.noreply.github.com> +Date: Sat Mar 6 15:49:34 2021 +0200 + + Issue #231: renamed test variable + +commit 5eb81e03123be767917829c9883b5b67ac9032cc +Author: hsergiu <57728877+hsergiu@users.noreply.github.com> +Date: Sat Mar 6 15:36:02 2021 +0200 + + Issue #231: Move endpoint related to payments from communities to payments + +commit bbaf69626ad1f07c2ae8174710beb8cb6fd3e972 (origin/master, origin/HEAD) +Merge: 9fed2c5 4a1a2e4 +Author: Marcin Słowiak +Date: Fri Mar 5 15:40:55 2021 +0100 + + Merge pull request #216 from DDmit04/feature/196--Email-templates + + Issue #196: email templates + +commit 9fed2c58dac7f476520c318e5fbc8ec508d74703 +Merge: f7ec6a4 b7adca1 +Author: Marcin Słowiak +Date: Wed Mar 3 22:01:44 2021 +0100 + + Merge pull request #251 from hsergiu/feature/issue-243--unit-tests-for-login-endpoint + +commit b7adca17f6904db93e40fb390182644a72b6faa7 (origin/feature/issue-243--unit-tests-for-login-endpoint) +Author: hsergiu <> +Date: Wed Mar 3 22:53:00 2021 +0200 + + Issue #243: adjust fields in AuthenticationSDJpaService + +commit 17f9028a1490938c3b1072c6832e3fb3a0bde7b4 +Author: hsergiu <> +Date: Wed Mar 3 11:47:53 2021 +0200 + + Issue #243: build fix + +commit 9ea4c19692561edba676c939c9497da663e0d83d +Merge: 11b192e f7ec6a4 +Author: hsergiu <> +Date: Wed Mar 3 11:05:28 2021 +0200 + + Merge update + +commit 11b192e1124348daefa4b3d1d0d55c74f6c77f99 +Author: hsergiu <> +Date: Wed Mar 3 10:53:54 2021 +0200 + + Issue #243: improve code + +commit f7ec6a40e40ea8056915faf7fcb1b009f5dd6483 +Merge: d4b1ba3 62ac7b3 +Author: Marcin Słowiak +Date: Tue Mar 2 16:10:51 2021 +0100 + + Merge pull request #252 from rrohak/patch-1 + + Update README.md: Added table of contents & links + +commit 62ac7b3a76db0c03e1ab1cc98d98416d0311928c +Author: rrohak <43389183+rrohak@users.noreply.github.com> +Date: Tue Mar 2 02:24:34 2021 -0500 + + Update README.md: Added table of contents & links + + Previously the readme did not have a table of contents to easily move through the page, or to easily link a heading. Also, the readme did not include a link to contributing.md, only that people should read it. + +commit 962b5b692493d21dfa7fcb1395da548812de1086 +Author: hsergiu <> +Date: Mon Mar 1 14:47:10 2021 +0200 + + Issue #243: add unit tests for AuthenticationController, AuthenticationSDJpaService, UserSDJpaService (method findUserByEmail) + +commit d4b1ba354b2058371b5c91a0d85c85fff90b5cf6 +Merge: f530767 862c62a +Author: Marcin Słowiak +Date: Sun Feb 28 10:41:02 2021 +0100 + + Merge pull request #250 from JanneSickert/master + + Issue #221: Update OpenApi to 5.0.1 + +commit 862c62a04365f973e8bec322db6f2fc30c1375a5 +Author: JanneSickert +Date: Sat Feb 27 19:46:19 2021 +0100 + + Issue #221: Update OpenApi to 5.0.1 + +commit 4a1a2e4aa1f79ab315ba2567a7c96e737a2855bf +Author: Дмитроченков Даниил Андреевич +Date: Thu Feb 25 01:45:40 2021 +0300 + + Issue #196 fix test + +commit cc793f09c6f0d884672e9b6fe9067ee9f8bf476c +Author: Дмитроченков Даниил Андреевич +Date: Thu Feb 25 01:45:25 2021 +0300 + + Issue #196 clean up + +commit 9c0f6926ae9e7bea18ccdcf3e23b331da180b232 +Author: Дмитроченков Даниил Андреевич +Date: Thu Feb 25 01:35:41 2021 +0300 + + Issue #196 restore locales and templates + +commit 0a034f25633a10a969243626b5be9053a91f334d +Author: Дмитроченков Даниил Андреевич +Date: Thu Feb 25 01:21:35 2021 +0300 + + Issue #196 little fixes + +commit f0eeb7fab5205cc45b08210a5e10c727f10837a3 +Author: Дмитроченков Даниил Андреевич +Date: Thu Feb 25 01:20:28 2021 +0300 + + Issue #196 fix email templates names + +commit b2a0461e182aa1f425e99311c7986dd791e716a1 +Author: Дмитроченков Даниил Андреевич +Date: Wed Feb 24 23:32:15 2021 +0300 + + Issue #196 fix error + +commit 63b84d0208647a45baff29a7de2d413b07e32107 +Author: Дмитроченков Даниил Андреевич +Date: Wed Feb 24 21:31:52 2021 +0300 + + Issue #196 rename mail prop + +commit 4f6bfc636b4701cd864805b6bd643861b088a476 +Author: Дмитроченков Даниил Андреевич +Date: Wed Feb 24 21:30:16 2021 +0300 + + Issue #196 fix tests + +commit 3f5fabaf97172c13c9cdc0c6922e0f4451fe2c2f +Author: Дмитроченков Даниил Андреевич +Date: Wed Feb 24 21:28:33 2021 +0300 + + Issue #196 separate Email properties to several classes + +commit 3872ea44cdbebb2e44832e783bed8d3ab74d5d79 +Author: Дмитроченков Даниил Андреевич +Date: Wed Feb 24 21:27:19 2021 +0300 + + Issue #196 turn `templateNames` from props to Enum + +commit 8d8d930380d890649ef36e049c61694bd2745f70 +Author: Дмитроченков Даниил Андреевич +Date: Wed Feb 24 21:26:27 2021 +0300 + + Issue #196 mov `template` and `localization` outside spring.mail + +commit 3b119579229b7f60254c823bb8826ae4bd23921e +Author: Дмитроченков Даниил Андреевич +Date: Tue Feb 23 00:29:08 2021 +0300 + + Issue #196 fix integration test + +commit 9bdebff444608d1465fa451d7fa3f2c256c0706f +Author: Дмитроченков Даниил Андреевич +Date: Mon Feb 22 23:24:37 2021 +0300 + + Issue #196 fix reflection using in tests + +commit fb1e5aba704359f3cff2d3cb337ebb9f15f3dd35 +Author: Дмитроченков Даниил Андреевич +Date: Mon Feb 22 19:30:09 2021 +0300 + + Issue #196 replace '@Value' with '@ConfigurationProperties' for mail props + +commit 67aa4b5721286aa6dd6c15aeac71f21dad4d2b8f +Author: Дмитроченков Даниил Андреевич +Date: Wed Jan 6 02:51:00 2021 +0300 + + Issue #196 fix tests + +commit fd915e184e2f747ce4d42f39eb1e0a6d7f92ab59 +Author: Дмитроченков Даниил Андреевич +Date: Wed Jan 6 01:57:17 2021 +0300 + + Issue #196 update MailService + +commit ece446c6493db8a179fa4da704a6ac3600ac5c80 +Author: Дмитроченков Даниил Андреевич +Date: Wed Feb 24 23:24:05 2021 +0300 + + Issue #196 add thymeleaf templates + +commit f5307676a860b60d996237e17fed50e89d379589 +Merge: ad8669e 9683502 +Author: Marcin Słowiak +Date: Tue Feb 23 17:32:00 2021 +0100 + + Merge pull request #249 from JanneSickert/master + + Issue #224: Divide postman collection into directories + +commit 9683502d6d434a11bc80f7cabbf7bb804ea059eb +Author: JanneSickert +Date: Tue Feb 23 15:40:55 2021 +0100 + + Issue #224: Divide postman collection into directories + +commit 04e5ff9c60ac38b7bb2788d1894ed9af00a1d37b +Author: Дмитроченков Даниил Андреевич +Date: Wed Jan 6 01:56:03 2021 +0300 + + Issue #196 add locales files + +commit 818c7594e15729ba0825fcb50326d5540f0af9c5 +Author: Дмитроченков Даниил Андреевич +Date: Wed Jan 6 01:55:07 2021 +0300 + + Issue #196 add email templates configs + +commit ad8669ecd6fac97e07697be9a9c4874319c01e31 +Author: Marcin Słowiak +Date: Sun Feb 21 20:31:15 2021 +0100 + + Fix integration test after #246 + +commit c50b5ffdab1cbe5a03b41ec4b4c104df1e88ad5f +Merge: b58e768 1903552 +Author: Marcin Słowiak +Date: Sun Feb 21 20:08:09 2021 +0100 + + Merge pull request #246 from jmprathab/feature/fixSecurityMatchers + + Fix security matchers + +commit 190355211e693c051e24af63cc860aa1bf559693 +Author: Marcin Słowiak +Date: Sun Feb 21 20:05:06 2021 +0100 + + Fix security matchers + +commit b58e768a7e3310884d2e1bbb2da7d5ae91e4c779 +Merge: 251450d bb449ef +Author: Marcin Słowiak +Date: Sun Feb 21 19:39:56 2021 +0100 + + Merge pull request #244 from jmprathab/feature/issue-234--addAuthorizationHeaderToOpenApiSpecs + + Issue #234: Add Authorization header to OpenApi specs + +commit 251450db7fc233950d559726a540a268ec8a385f +Merge: 48235a7 63f9cf3 +Author: Marcin Słowiak +Date: Sun Feb 21 19:39:45 2021 +0100 + + Merge pull request #245 from jmprathab/feature/apiExplorationDocumentation + + Add information about swagger and postman API usage + +commit 63f9cf3d1eede813176c1a2eb7685c11afcb2271 +Author: Marcin Słowiak +Date: Sun Feb 21 19:39:20 2021 +0100 + + Add information about swagger and postman API usage + +commit bb449ef3b59d86fd91ac1241626be44667e216f9 +Author: Marcin Słowiak +Date: Sun Feb 21 19:34:14 2021 +0100 + + Issue #234: Add Authorization header to OpenApi specs + +commit 48235a774d4b096b4fc4e4f35cd05face179086b +Merge: c60b96c 2afceac +Author: Marcin Słowiak +Date: Sat Feb 20 22:35:44 2021 +0100 + + Merge pull request #210 from edwardUL99/bugfix/issue-206-PaymentController-Null-Exception + +commit 2afceac79a370ab2ebad84a5ac6e5af58fa676f0 +Author: Edward Lynch-Milner +Date: Sat Feb 20 20:58:56 2021 +0000 + + Issue #206 : Resolved pull request changes + +commit c60b96c99ad41e0280b5941b31a1f1d32985218e +Merge: 353afa9 d938d98 +Author: Marcin Słowiak +Date: Fri Feb 19 22:42:33 2021 +0100 + + Merge pull request #236 from Tobi406/fix-235/500-thrown-when-requesting-payments + + Change access level of properties in PageInfo.java. + +commit d938d980cf577d8adf7408ee6e0bd8690b7dd00c +Author: Marcin Słowiak +Date: Fri Feb 19 22:32:19 2021 +0100 + + Issue #235: Add getters for PageInfo class + +commit 353afa9cd307c5fbb754e22593ba19bbbdda2e71 +Merge: 17584b8 4deb940 +Author: Marcin Słowiak +Date: Fri Feb 19 22:29:15 2021 +0100 + + Merge pull request #242 from jmprathab/feature/239--delete-deprecated-login-filter + + Issue #239: Delete deprecated login filter + +commit 4deb9400ac12590ac7ecfa1d885020b7c26d4d2f +Author: Marcin Słowiak +Date: Fri Feb 19 22:23:13 2021 +0100 + + Issue #239: Delete deprecated login filter + +commit 17584b888cfb1abd44010eaa75397d56c9f3d234 +Merge: be4f803 4528d42 +Author: Marcin Słowiak +Date: Fri Feb 19 22:25:09 2021 +0100 + + Merge pull request #241 from jmprathab/feature/addLocalhostServerAndNewLoginExposure + + Add new login endpoint exposure and localhost server to OpenAPI specs + +commit 4528d42427ac7fb14852d796127e9148c213bce6 +Author: Marcin Słowiak +Date: Fri Feb 19 22:24:48 2021 +0100 + + Add new login endpoint exposure and localhost server to OpenAPI specs + +commit be4f8032bfa6914bc55f5e0e6eb3545c37aac4d7 +Merge: ec4ecb8 ea5bc51 +Author: Marcin Słowiak +Date: Fri Feb 19 22:17:26 2021 +0100 + + Merge pull request #240 from jmprathab/feature/238--addLoginToApiSpecs + + Issue #238: Add auth/login endpoint to api specs + +commit ea5bc51f003a0e15e8246e96abe25cbe5c65e9a6 +Author: Marcin Słowiak +Date: Fri Feb 19 22:06:11 2021 +0100 + + Issue #238: Add auth/login endpoint to api specs + +commit ec4ecb84946f7cf98da3c950e67ce1457feca25d +Merge: a33b954 816eb84 +Author: Marcin Słowiak +Date: Thu Feb 18 20:34:10 2021 +0100 + + Merge pull request #230 from jmprathab/feature/225--enable-useTags-openapi-generator + + Issue #225: Enable useTags for OpenApi specs + +commit 816eb84b012d038589a2aacd13010214ebc18b35 +Author: Marcin Słowiak +Date: Thu Feb 18 18:32:14 2021 +0100 + + Issue #225: Enable useTags for OpenApi specs + +commit a33b9544b77b573aea74916f75e100991022a52e +Merge: 6f2ef4a 1640249 +Author: Marcin Słowiak +Date: Thu Feb 18 18:04:14 2021 +0100 + + Merge pull request #229 from jmprathab/feature/227--fix-typos-in-specs + + Issue #227: Fix typos in specs + +commit 1640249dfd2465a4da0016e41ce88ca0083dd73b +Author: Marcin Słowiak +Date: Thu Feb 18 17:59:48 2021 +0100 + + Issue #227: Use proper object type bigdecimal -> number + +commit 6b3f5660248d1b3417ad8886343d11891024610f +Author: Marcin Słowiak +Date: Thu Feb 18 17:36:55 2021 +0100 + + Issue #227: Fix typos and add uppercase + +commit 6f2ef4a728c13bf5576c2e652aec4b6b764660c6 +Merge: 12eedc6 9bd6ecc +Author: Marcin Słowiak +Date: Thu Feb 18 17:15:25 2021 +0100 + + Merge pull request #223 from jmprathab/feature/issue--222-add-pagination-results-for-payments + + Issue #222: Add pagination results for payments + +commit 9bd6eccdf0421e132374c32331afc99615cfe772 +Author: Marcin Słowiak +Date: Wed Feb 17 22:44:33 2021 +0100 + + Issue #222: Add lombok to api module + +commit 2d968f10eb7f57cf61629bac7b45a5698eee214a +Author: Marcin Słowiak +Date: Wed Feb 17 22:40:11 2021 +0100 + + Issue #222: Add support for paging information in response + +commit 12eedc6ab959f522dfe75440f47c35be246ef63a +Merge: 616e43c 3789605 +Author: Marcin Słowiak +Date: Wed Feb 17 20:39:29 2021 +0100 + + Merge pull request #219 from jmprathab/bugfix/214--replace-old-swaggerdocs + + Issue #214: Replace old swaggerdocs with new approach + +commit 3789605ca439e1191dedeb75082b4dad5632d73e +Author: Marcin Słowiak +Date: Tue Feb 16 22:31:51 2021 +0100 + + Issue #214: Update docs + +commit 35de6cec51719a4e6dbc69d078f4e9c458bfaf8b +Author: Marcin Słowiak +Date: Tue Feb 16 22:29:09 2021 +0100 + + Issue #214: Remove old swagger docs and replace with new one + +commit 616e43c79f930f5e5ba65fc16721d5265dee217e +Merge: 5f4501d 7f53031 +Author: Marcin Słowiak +Date: Tue Feb 16 21:55:38 2021 +0100 + + Merge pull request #218 from jmprathab/feature/disable-smtp-healthcheck + + Disable SMTP healthcheck + +commit 7f53031bc07dddd0559c8207103a3009748186f4 +Author: Marcin Słowiak +Date: Tue Feb 16 21:54:08 2021 +0100 + + Disable SMTP healthcheck + +commit 5f4501d4a97f9b48095f5433a56dceb7f6749b5c +Merge: 610a129 a4511b1 +Author: Prathab +Date: Wed Feb 10 18:59:11 2021 +0530 + + Merge pull request #215 from DDmit04/feature/221--Email-confirm-functionality + + Issue #211: email confirm functionality + +commit a4511b1324d9fb59c332a6c58dee4976f28f3482 +Author: Дмитроченков Даниил Андреевич +Date: Wed Jan 6 02:35:18 2021 +0300 + + Issue #211 fix tests + +commit d3f4f1dcc5022a127bfa23c9a29d07cad7afac69 +Author: Дмитроченков Даниил Андреевич +Date: Wed Jan 6 02:30:27 2021 +0300 + + Issue #211 fix + +commit f003bdd7cc2b925e33205ee5c00612ca81110938 +Author: Дмитроченков Даниил Андреевич +Date: Wed Jan 6 02:28:20 2021 +0300 + + Issue #211 update UserSDJpaService tests + +commit c88372795fb188a0dfde1bbd0086852204b51240 +Author: Дмитроченков Даниил Андреевич +Date: Wed Jan 6 02:27:11 2021 +0300 + + Issue #211 fix and add SecurityToken tests + +commit de52ac02f029caecc3f905dd05b7256339097761 +Author: Дмитроченков Даниил Андреевич +Date: Wed Jan 6 01:40:35 2021 +0300 + + Issue #211 update data.sql + +commit 2a91f6445c1684f12ed14555ae566d2d595a8ca4 +Author: Дмитроченков Даниил Андреевич +Date: Wed Jan 6 01:39:54 2021 +0300 + + Issue #211 add email confirm mappings + +commit 78b0d835c7cd3bf2565fd7a2f7a6859dc65b619e +Author: Дмитроченков Даниил Андреевич +Date: Wed Jan 6 01:37:14 2021 +0300 + + Issue #211 update UserService + +commit 237ec59c8368990705179d3dcdc16c0214c9ae7b +Author: Дмитроченков Даниил Андреевич +Date: Wed Jan 6 01:30:21 2021 +0300 + + Issue #211 update SecurityToken and SecurityTokenService + +commit bf9eed43defec5ca37fae6c004ffc6a79096fd25 +Author: Дмитроченков Даниил Андреевич +Date: Wed Jan 6 01:26:36 2021 +0300 + + Issue #211 add `emailConfirmed` field to User + +commit 799ddd7908a212e45bdbaddf67a2fad7f57e696a +Author: Edward Lynch-Milner <18222021@studentmail.ul.ie> +Date: Tue Dec 8 20:53:49 2020 +0000 + + Added AfterMapping which maps user details in enriched request to UserDto and member details to HouseMemberDto to resolve the null exceptions. Made Payment#description non-unique + +commit 610a1298c63df85d56c8b654e4f30c636c1d98c6 +Merge: 94d28e8 91ff17c +Author: Prathab +Date: Thu Nov 19 13:38:56 2020 +0530 + + Merge pull request #209 from DDmit04/feature/208--MailService-bugfixes + + Issue#208 mail service bugfixes + +commit 91ff17c5d35f69699fd0f32a3bff3203693bae0a +Author: Дмитроченков Даниил Андреевич +Date: Thu Nov 12 16:39:59 2020 +0300 + + Issue #208 fix data sql + +commit 7680b57164e59a45dc1d057e3661de4a0e22e420 +Author: Дмитроченков Даниил Андреевич +Date: Thu Nov 12 16:39:28 2020 +0300 + + Issue #208 fix postman config + +commit 94d28e8f1792a74080c95dfc043f5db7f49b6f41 +Merge: fc41037 f873035 +Author: Marcin Słowiak +Date: Sat Nov 7 14:11:51 2020 +0100 + + Merge pull request #194 from DDmit04/feature/151--Forgot-Password-functionality + + Feature #151 Implement Forgot Password functionality + +commit f873035d197341dfb5ac16be5b69feb780fe6e81 +Author: Дмитроченков Даниил Андреевич +Date: Fri Nov 6 11:07:58 2020 +0300 + + Issue #151 fix build + +commit 58ff8ff5dfe3475a540a93ee5ffb56303f9ee877 +Merge: d6334d5 fc41037 +Author: DDmit04 <46588421+DDmit04@users.noreply.github.com> +Date: Fri Nov 6 10:29:37 2020 +0300 + + Merge branch 'master' into feature/151--Forgot-Password-functionality + +commit fc410376bf2cb568e579a5ad71517d7e77a21a04 +Merge: a24da1c e3f882f +Author: Prathab +Date: Thu Nov 5 19:55:38 2020 +0530 + + Merge pull request #195 from SergeyHydra/feature/issue-176--migration-amenityController-openApi + + Issue #176: Migration of AmenityController to OpenApi yaml schema + +commit d6334d5fa0fbaf9883c94545e33b2be74cd23770 +Author: Дмитроченков Даниил Андреевич +Date: Wed Nov 4 11:54:28 2020 +0300 + + Issue #151 update tests + +commit e64fb75f824a7dc6264a568740009dcdbc37e1bc +Author: Дмитроченков Даниил Андреевич +Date: Wed Nov 4 01:52:03 2020 +0300 + + Issue #151 add MailService tests + +commit 886ffa48d76c37b3390dee4dea25f4c9a982716f +Author: Дмитроченков Даниил Андреевич +Date: Wed Nov 4 01:27:07 2020 +0300 + + Issue #151 fix tests + +commit c7b3bdc319c31ba70ba27ed61744fdf4574c710c +Author: Дмитроченков Даниил Андреевич +Date: Wed Nov 4 01:26:49 2020 +0300 + + Issue #151 make MailService methods return boolean + +commit a1ae6faf377816d2486a57f54826e4a77859376f +Author: Дмитроченков Даниил Андреевич +Date: Wed Nov 4 00:37:54 2020 +0300 + + Issue #151 extract mail texts to final vars + +commit 307606e82e2b9fa6c621a9b23ca1ef539cca776c +Author: Дмитроченков Даниил Андреевич +Date: Wed Nov 4 00:32:11 2020 +0300 + + Issue #151 clean up + +commit e3f882fd8cffcc7bfaeac6dc8c35a9175aa7878a +Author: Сердюк Сергей Владимирович +Date: Sun Nov 1 21:04:14 2020 +0300 + + Issue #176: fixing build + +commit ef84668080433bdb89f2d21c1e519a0fad63df28 +Author: Сердюк Сергей Владимирович +Date: Thu Oct 15 21:25:12 2020 +0300 + + Issue #176: fixing pr comments + +commit 6fc31c41d82a82c19479ee150232fdf941201918 +Author: Сердюк Сергей Владимирович +Date: Wed Oct 14 00:37:59 2020 +0300 + + Issue #176: delete unused type mapping + +commit d20adbf4897a6ae68c9587147ad1a945c65a3233 +Author: Сердюк Сергей Владимирович +Date: Wed Oct 14 00:16:09 2020 +0300 + + Issue #176: migrated AmenityController to open api spec + +commit 6fbc7950a9a89bcbc94c8e493df9a0a0b10c222d +Author: Сердюк Сергей Владимирович +Date: Mon Oct 12 23:49:42 2020 +0300 + + Issue #176: init commit + +commit 09699b7449a393f961f2b96534d3f84c70148b75 +Author: Дмитроченков Даниил Андреевич +Date: Sat Oct 31 01:00:16 2020 +0300 + + Issue #151 fix build + +commit ee820c4796a97c88d84f95aff9b9b4be84063db8 +Merge: 50c0ae5 a24da1c +Author: DDmit04 <46588421+DDmit04@users.noreply.github.com> +Date: Sat Oct 31 00:16:11 2020 +0300 + + Merge branch 'master' into feature/151--Forgot-Password-functionality + +commit a24da1c36311fbb62248c76465949865d3e3f688 +Merge: be83a0f d0f6132 +Author: Marcin Słowiak +Date: Fri Oct 30 15:06:11 2020 +0100 + + Merge pull request #203 from rmgrimm/feature/issue-183--integration-tests + + Issue #183: Setup integration-tests module + +commit d0f613293e4ec217b1fcbdb869b9a16b061d0e6b +Author: Robert Grimm +Date: Fri Oct 30 08:43:31 2020 -0500 + + Issue #183: Switch to TestRestTemplate instead of RestAssured + +commit 489f89278bb9e4b450b4e38ec6bdf613ccd80fc9 +Author: Robert Grimm +Date: Fri Oct 30 02:43:54 2020 -0500 + + Issue #183: Configure integration-tests module; Add sample integration test + +commit be83a0f1ff15848eb71e33a9066790cd54471287 +Merge: 8795e75 7b2b34e +Author: Marcin Słowiak +Date: Sat Oct 24 10:51:12 2020 +0200 + + Merge pull request #200 from rmgrimm/feature/issue-159--list-housemates + + Issue #159: Endpoint to get all members of all houses a user is in + +commit 8795e75328034e22cff42c99c5bf1a4949b2628c +Merge: cdeefa5 d594fc2 +Author: Marcin Słowiak +Date: Sat Oct 24 10:38:29 2020 +0200 + + Merge pull request #191 from edwin9870/feature/172--migration-of-paymentController-to-openApi-yaml-schema + + Issue #172: Migration of PaymentController to OpenApi yaml schema + +commit d594fc2941c46af4ed7cdb76a279c212c5612865 +Author: Edwin Ramirez Ventura +Date: Fri Oct 23 23:39:07 2020 -0400 + + Issue #172: Move PaymentController.listAllMemberPayments to HouseMemberDocumentController and PaymentController.listAllAdminScheduledPayments to CommunityController. + + This refactor includes move test to respective classes. + +commit 9804cb5534c1ad948392118bb30d78a021bd5c1e +Merge: aeb9941 cdeefa5 +Author: Edwin Ramirez Ventura +Date: Fri Oct 23 23:29:41 2020 -0400 + + Issue #172: Merge upstream master changes + +commit 7b2b34ea0532609461928f32f71537af53fe6151 +Author: Robert Grimm +Date: Thu Oct 22 01:41:46 2020 -0500 + + Issue #159: Add endpoint for listing members of all houses for a user + +commit cdeefa5ea10c3f1dc86839834e788b14a21a7aa6 +Merge: 7f03188 6cb5802 +Author: Marcin Słowiak +Date: Mon Oct 19 08:50:08 2020 +0200 + + Merge pull request #198 from edwin9870/feature/issue-174--migration-of-housecontroller-to-openapi-yaml-schema + + Issue #174: Migration of HouseController to OpenApi yaml schema + +commit 6cb5802c433aa32f9011a2e32a383a052758e347 +Author: Edwin Ramirez Ventura +Date: Sun Oct 18 19:43:24 2020 -0400 + + Issue #174: Remove 404 responseCode in api.yaml at for get /houses + +commit d5101921ab7d530f67acff2482f3dc7acdd23bf1 +Author: Edwin Ramirez Ventura +Date: Sun Oct 18 19:39:12 2020 -0400 + + Issue #174: Format HouseControllerTest to make it more readable + +commit 50c0ae5f5b70471810e082efc0956b1b867ad423 +Merge: f65957d 7f03188 +Author: DDmit04 <46588421+DDmit04@users.noreply.github.com> +Date: Sun Oct 18 22:11:37 2020 +0300 + + Merge branch 'master' into feature/151--Forgot-Password-functionality + +commit f65957df1c37b25f075a1d16970282ca77c53fcd +Author: Дмитроченков Даниил Андреевич +Date: Sun Oct 18 22:08:49 2020 +0300 + + Issue #151 clean up + +commit dbd71bf5b29f24ac7a6cf6ad5645762c39a438a1 +Author: Edwin Ramirez Ventura +Date: Sat Oct 17 21:33:03 2020 -0400 + + Issue #174: Remove not used import + +commit ce24a4907e4f2e79395f7a6695fb13ed492d0a21 +Author: Edwin Ramirez Ventura +Date: Sat Oct 17 21:23:28 2020 -0400 + + Issue #174: Remove ID parameter required from HouseMemberDTO + +commit a09955e54aa5292af2ada79fdabd40490b172024 +Author: Edwin Ramirez Ventura +Date: Sat Oct 17 21:12:27 2020 -0400 + + Issue #174: Migrate HouseController.deleteHouseMember to OpenApi + +commit 81b41ab795e2d6bda85e8aab9de53c6feb05f378 +Author: Edwin Ramirez Ventura +Date: Sat Oct 17 20:46:34 2020 -0400 + + Issue #174: Rename HouseMemberMapper.newHouseMemberSetToHouseMemberSet to HouseMemberMapper.houseMemberDtoSetToHouseMemberSet + +commit d40bb91ef5d9a073e307641ad617409d4301c655 +Author: Edwin Ramirez Ventura +Date: Sat Oct 17 20:24:02 2020 -0400 + + Issue #174: Migrate HouseController.listAllMembersOfHouse and HouseController.addHouseMembers to OpenAPI yaml + +commit 2c19a9f4353fc69a14a308bf100a63f217c57394 +Author: Edwin Ramirez Ventura +Date: Sat Oct 17 19:28:37 2020 -0400 + + Issue #174: Migrate HouseController.listAllHouses and HouseController.getHouseDetails to OpenAPI yaml + +commit 3c5bf885d19933a5f5e4ff64bd1ae4cafd70fd4c +Author: Дмитроченков Даниил Андреевич +Date: Sat Oct 17 22:34:08 2020 +0300 + + Issue #151 fix build + +commit 6b752271b332c3777974913a38f1919daf98dc59 +Author: Дмитроченков Даниил Андреевич +Date: Sat Oct 17 19:03:23 2020 +0300 + + Issue #151 fix UserSDJpaServiceTest + +commit 9feb7c0da8a39ef28341a3e17fbfd45ad3b0af27 +Author: Дмитроченков Даниил Андреевич +Date: Sat Oct 17 19:02:58 2020 +0300 + + Issue #151 fix SecurityTokenSDJpaServiceTest + +commit 9463092724d709e874046e3896b500f600c64bfe +Author: Дмитроченков Даниил Андреевич +Date: Sat Oct 17 19:02:28 2020 +0300 + + Issue #151 fix UserControllerTest + +commit 058e5fb1350b044069244c0725db7dcb96e8aa28 +Author: Дмитроченков Даниил Андреевич +Date: Sat Oct 17 18:55:47 2020 +0300 + + Issue #151 add dev version of MailSDJpaService + +commit 937f6a528beb55299376cd31b925f3ede98f41c2 +Author: Дмитроченков Даниил Андреевич +Date: Sat Oct 17 18:54:34 2020 +0300 + + Issue #151 turn SecurityToken - User relationsips to ManyToOne + +commit e5ab9bdc4c705b48b0b74ae193fe532d9c548c9b +Author: Дмитроченков Даниил Андреевич +Date: Fri Oct 16 10:36:12 2020 +0300 + + Issue #151 migrate new endpoint to 'api.yaml' + +commit 4f2c9876f54a3196a64ffb7392b2988de5b00a1e +Author: Дмитроченков Даниил Андреевич +Date: Fri Oct 16 10:35:29 2020 +0300 + + Issue #151 add 'isUsed' prop to SecurityToken + +commit 1bab0537a1ff331bf3d8a1c7caf100c3e88340e1 +Author: Дмитроченков Даниил Андреевич +Date: Fri Oct 16 10:30:34 2020 +0300 + + Issue #151 turn token Dates to LocalTimes + +commit 516e65510a04dfcd68d964bd2e890bbe3c3d95ac +Author: Дмитроченков Даниил Андреевич +Date: Fri Oct 16 10:26:08 2020 +0300 + + Issue #151 configure SMTP with enviroment varibles + +commit 2444fcb90d808ef06247beb3217256fa1207a841 +Author: Дмитроченков Даниил Андреевич +Date: Fri Oct 16 10:24:42 2020 +0300 + + Issue #151 fix gradle dependency + +commit 7f03188962cf98ed84cf8d1eb4a01af54412f3e3 +Merge: 13e1bea 7b5a485 +Author: Prathab +Date: Thu Oct 15 18:07:33 2020 +0530 + + Merge pull request #197 from tomsajuk/feature/issue-116--DeleteAmenityBooking + + Issue #116: Add Endpoint for Delete Amenity Booking + +commit 7b5a485f6aeda7a223d917cb657f76f5a0fc43f8 +Author: tomsajuk +Date: Thu Oct 15 08:35:46 2020 +0530 + + Issue #116: Add Endpoint for Delete Amenity Booking + +commit a51e01b891e15feb88c848a129e832a519e91c59 +Author: Дмитроченков Даниил Андреевич +Date: Wed Oct 14 14:55:12 2020 +0300 + + Issue #151 rename MyHomeTokenType by SecurityTokenType + +commit 25f2961a00515b0d7f6a6b79505c48850c72b1b0 +Author: Дмитроченков Даниил Андреевич +Date: Wed Oct 14 00:34:16 2020 +0300 + + Issue #151 change hibernate SecurityToken.tokenType enum type + +commit a4c90c2523e30870b9a45429a14c1a112313924b +Author: Дмитроченков Даниил Андреевич +Date: Wed Oct 14 00:17:36 2020 +0300 + + Issue #151 clean up + +commit df5a9a93da49032dd2999baa616be49607f9bf7e +Author: Дмитроченков Даниил Андреевич +Date: Wed Oct 14 00:13:28 2020 +0300 + + Issue #151 try fix + +commit 63498542db0ea577ca11bcc5c5803ce34650e407 +Author: Дмитроченков Даниил Андреевич +Date: Tue Oct 13 23:43:13 2020 +0300 + + Issue #151 Add new UserController tests + +commit 2ef6d0eab2192ddb60bd3d641479869c845ddbc8 +Author: Дмитроченков Даниил Андреевич +Date: Tue Oct 13 23:42:50 2020 +0300 + + Issue #151 Add new UserService tests + +commit 06785faffa00ad5a92dfa38dc29dd239fc44c19b +Author: Дмитроченков Даниил Андреевич +Date: Tue Oct 13 23:35:09 2020 +0300 + + Issue #151 fix User service + +commit f25df255d3a12cc327fe88c33f1c02ddf451a840 +Author: Дмитроченков Даниил Андреевич +Date: Tue Oct 13 23:34:32 2020 +0300 + + Issue #151 fix tests with new User entity constructor + +commit 571a0f0ddd158727cdfa632407003c32ad30f201 +Author: Дмитроченков Даниил Андреевич +Date: Tue Oct 13 18:17:12 2020 +0300 + + Issue #151 Crete tests for SecurityTokenService + +commit 75e219dc480c974dc8ab7c8a839e197c194d6eed +Author: Дмитроченков Даниил Андреевич +Date: Tue Oct 13 12:33:10 2020 +0300 + + Issue #151 update postman configuration with new endpoint + +commit a35a0014882c7d31902ef04d413038df4ed1e40f +Author: Дмитроченков Даниил Андреевич +Date: Tue Oct 13 12:32:36 2020 +0300 + + Issue #151 update UserController with forgot password functionality + +commit 8b77473a127c5aebd4343aeae787ff36cd1b1e2c +Author: Дмитроченков Даниил Андреевич +Date: Tue Oct 13 12:31:50 2020 +0300 + + Issue #151 update UserService with forgot password functionality + +commit a489d3478cafc7726c85c015812b0743d05a596b +Author: Дмитроченков Даниил Андреевич +Date: Tue Oct 13 12:30:26 2020 +0300 + + Issue #151 Add SecurityTokenService + +commit 1a5ba624ab44ff7d982da187794ce7d8c468c696 +Author: Дмитроченков Даниил Андреевич +Date: Tue Oct 13 12:29:27 2020 +0300 + + Issue #151 Add MailService + +commit 7d6f36c148c2be024b423f0fe6a14542a4d82235 +Author: Дмитроченков Даниил Андреевич +Date: Tue Oct 13 12:28:20 2020 +0300 + + Issue #151 Add SecurityToken to data.sql + +commit e003ac12a3ff9980539c9f93933187b155b22708 +Author: Дмитроченков Даниил Андреевич +Date: Tue Oct 13 12:25:21 2020 +0300 + + Issue #151 Add SecurityToken entity + +commit 13e1beac2c036c6b402d73fd00393a1659407d71 +Merge: d2296b5 e446e0e +Author: Marcin Słowiak +Date: Tue Oct 13 17:58:59 2020 +0200 + + Merge pull request #193 from huyle1097/bugfix/issue-192--remove-unused-payment-service-method + + Issue #192: remove unused methods in PaymentService + +commit aeb99416b8d5a9f187026429376f1cb4b79ea26b +Author: Edwin Ramirez Ventura +Date: Tue Oct 13 09:45:54 2020 -0400 + + Issue #172: Add booleanGetterPrefix is and refactor the code affected by this + +commit e446e0eea732b3239022ac5703462c8bd095c6d0 +Author: huyle1097 +Date: Tue Oct 13 20:36:37 2020 +0700 + + Issue #192: remove unused methods in PaymentService + +commit 92513d4ca411bf95b562600e191a028ef8fb4d61 +Author: Edwin Ramirez Ventura +Date: Tue Oct 13 08:59:12 2020 -0400 + + Issue #172: Fix Communities's tag typo in apy.yaml + +commit d2296b5446c7535f7d19d15b87df5987642e2180 +Merge: 50f0213 46432fa +Author: Marcin Słowiak +Date: Tue Oct 13 12:44:56 2020 +0200 + + Merge pull request #190 from huyle1097/feature/issue-175--community-controller-openapi-migration + + Issue #175: Migration of CommunityController to OpenApi yaml schema + +commit 46432fa89b6deba57c7f480117f302b5a3d8267d +Author: huyle1097 +Date: Tue Oct 13 16:22:05 2020 +0700 + + Issue #175: format code + +commit 64e5e12155ae92a29049e895d0cac35cc14f3503 +Author: huyle1097 +Date: Tue Oct 13 07:25:55 2020 +0700 + + Issue #175: remove unused dto and fix test + +commit bf6907cf7f322f892b2dba79cd2b0d2cafcd3239 +Author: huyle1097 +Date: Tue Oct 13 07:21:42 2020 +0700 + + Issue #175: Convert /communities/{communityId}/houses/{houseId} to OpenApi yaml specification + +commit 0d7fcfbcd0a67abeedd6af1a3663af7fef3e0e5c +Author: huyle1097 +Date: Tue Oct 13 07:18:54 2020 +0700 + + Issue #175: Convert /communities/{communityId}/houses to OpenApi yaml specification + +commit 318899be0e52a96fa2b4bbd5356f9ba5bafff8aa +Author: huyle1097 +Date: Tue Oct 13 07:11:48 2020 +0700 + + Issue #175: Convert /communities/{communityId}/admins/{adminId} to OpenApi yaml specification + +commit 21b80eded80e31f34b04db79de33dd6845c7b300 +Author: huyle1097 +Date: Tue Oct 13 07:09:31 2020 +0700 + + Issue #175: Convert /communities/{communityId}/admins to OpenApi yaml specification + +commit 621df5f8f62731c03541c6eeaebb711884d2977a +Author: huyle1097 +Date: Tue Oct 13 07:03:53 2020 +0700 + + Issue #175: Convert /communities/{communityId} to OpenApi yaml specification + +commit a2adcd828ce770a86cca008d4b763c44688dae85 +Author: huyle1097 +Date: Tue Oct 13 06:49:25 2020 +0700 + + Issue #175: Convert /communities to OpenApi yaml specification + +commit 50f0213b6c1e2690019b64ab627daad3da4726dd +Author: Marcin Słowiak +Date: Tue Oct 13 11:48:47 2020 +0200 + + Fix WebSecurity after merging PR + +commit a2f48827b0d25e2be7c8a75782631fa4cda16a4b +Author: Thomas Windt +Date: Mon Oct 12 14:59:10 2020 +0200 + + Issue #150: Add Admin Filter + + Signed-off-by: Thomas Windt + (cherry picked from commit 00c4b5f65e8d415f39b56b6bbf5dd7b72c2c6c2d) + +commit 81a28e25988a76b72ed1dd39847badaacee7d345 +Author: Edwin Ramirez Ventura +Date: Mon Oct 12 21:07:03 2020 -0400 + + Migrate PaymentController.listAllAdminScheduledPayments to OpenApi + +commit 43656a4603bd28a53bdb70dc024fe3abaf69bcb1 +Author: Edwin Ramirez Ventura +Date: Mon Oct 12 20:56:26 2020 -0400 + + Migrate PaymentController.listAllMemberPayments to OpenApi + +commit 7ae277df44572bfb6a00099ba7ace67ec41059d8 +Author: Edwin Ramirez Ventura +Date: Mon Oct 12 20:13:14 2020 -0400 + + Migrate PaymentController.listPaymentDetails to OpenApi + +commit a4a9e0407f1cf7ba8a2830b50521bdffb79117f0 +Merge: 2daa3db 085cc4e +Author: Marcin Słowiak +Date: Mon Oct 12 19:43:22 2020 +0200 + + Merge pull request #165 from fx0000/feature/#125--amenity_creation_access + + Issue #152: Add authorization filter for community + +commit 085cc4e15184713682e203f2a55b192d4d20238b +Author: myself +Date: Mon Oct 12 19:44:02 2020 +0200 + + Issue #152: apply code style for filter class + +commit 52d9c9a9c0836886bb88abf550c5e03aab159b2b +Author: myself +Date: Mon Oct 12 12:38:00 2020 +0200 + + Issue #152: apply code style + +commit 083e14b38ad41764e4fde4168aa0c4d1d1b6a69f +Author: myself +Date: Fri Oct 9 22:05:40 2020 +0200 + + Issue #152: remove tests + +commit 1e80c7ea34da439d3881d35b59693778dd565eef +Author: myself +Date: Sat Oct 10 13:44:53 2020 +0200 + + Issue #152: review changes + +commit 16505c447bfc031ca0c24512e5c285fe1c431958 +Author: myself +Date: Fri Oct 9 22:05:40 2020 +0200 + + Issue #152: code styles, code review edits + +commit 4d87f21edfc1a35b19960761c6e9d63bdda1510c +Author: myself +Date: Fri Oct 9 18:35:12 2020 +0200 + + Issue #152: modify tests, remove test profile, fix build + +commit 7d5c9d42bb8b382b8b88d5ae0a8c1efa8215588d +Author: myself +Date: Fri Oct 9 16:18:25 2020 +0200 + + Issue #152: Add tests + +commit a83b6826ad835f8de000c26b4616f194ef44a4bf +Author: myself +Date: Thu Oct 8 17:24:03 2020 +0200 + + Issue #152: Add authorization filter for community + +commit 2daa3dbb31ac73b184269432381d86dd4680649b +Merge: 7bad375 afe0212 +Author: Marcin Słowiak +Date: Mon Oct 12 12:29:37 2020 +0200 + + Merge pull request #188 from huyle1097/feature/issue-173--house-member-document-controller-openapi-migration + + Issue #173: Migration of HouseMemberDocumentController to OpenApi yaml schema + +commit afe021238541d13b4e8d8a98f1f3f8d5b7a150aa +Author: huyle1097 +Date: Mon Oct 12 07:58:10 2020 +0700 + + Issue #173: Change tag name, fix typo + +commit e66da6d22a96c47d39bfc4a8c4d3b6a8f7bab10e +Author: huyle1097 +Date: Sun Oct 11 22:25:38 2020 +0700 + + Issue #173: Convert /members/{memberId}/documents to OpenApi yaml specification + +commit 7bad375b5599487e343d7c19f6001b9a17d6c792 +Merge: 80029a2 4319843 +Author: Marcin Słowiak +Date: Sun Oct 11 19:32:38 2020 +0200 + + Merge pull request #167 from DDmit04/feature/157--Repeating-helper-methods-in-tests + + Issue #157: Repeating helper methods in tests + +commit 80029a28eaeb75a7efa7a9c4a40b64df8a7b73ea +Merge: 202f2c0 61eca83 +Author: Marcin Słowiak +Date: Sun Oct 11 19:12:29 2020 +0200 + + Merge pull request #189 from jmprathab/feature/adjust-contribution-guide + + Add info about commit names, features vs defects, rebase over merge + +commit 61eca8351041470f938abdea9ae8f1cc5725044d +Author: Marcin Słowiak +Date: Sun Oct 11 19:11:56 2020 +0200 + + Add info about commit names, features vs defects, rebase over merge + +commit 431984384f27afbcd30f05c76be4600d2b8b933e +Author: Дмитроченков Даниил Андреевич +Date: Thu Oct 8 23:38:38 2020 +0300 + + issue #157 apply new help class to test classes + +commit eb4ea164524696aa064e19a63ef32b89a8347b6d +Author: Дмитроченков Даниил Андреевич +Date: Thu Oct 8 23:37:46 2020 +0300 + + issue #157 remove help methods from test classes + +commit e99347925d0fb8d2a2aa005ac7e2a46df71f225e +Author: Дмитроченков Даниил Андреевич +Date: Thu Oct 8 23:34:32 2020 +0300 + + issue #157 add test helper class + +commit cd4efb9075de4a310fce790c4e75b247ffa58523 +Author: Edwin Ramirez Ventura +Date: Sat Oct 10 23:52:42 2020 -0400 + + Migrate PaymentController.schedulePayment to OpenApi + +commit 202f2c05c0495bd1ae7ed11cb037d745a3514387 +Merge: 2f47757 b94ad05 +Author: Marcin Słowiak +Date: Sat Oct 10 19:33:48 2020 +0200 + + Merge pull request #185 from P3trur0/feature/160--add-spring-actuator + + Issue #160: Replace HealthCheckController with Spring Actuator + +commit b94ad05debdcf1603d3be791037de30df271471d +Author: upescatore +Date: Thu Oct 8 20:34:34 2020 +0200 + + Issue #160: Add Spring Boot Actuator endpoints + +commit 2f47757ae00947538a71f10ca6caa9e3b02b0cb8 +Merge: ae4b521 0486a56 +Author: Marcin Słowiak +Date: Sat Oct 10 18:16:29 2020 +0200 + + Merge pull request #184 from jmprathab/feature/issue-182--remove-integration-tests + + Issue #182: Remove integration tests + +commit ae4b521865b85c5ed7a12a15c531cada33feb68c +Merge: d59859c 609ba5c +Author: Marcin Słowiak +Date: Sat Oct 10 18:15:59 2020 +0200 + + Merge pull request #171 from jmprathab/feature/issue-170--users-controller-openapi-migration + + Issue #170: Users controller OpenApi migration + +commit 0486a56abfca9671b566061450e2ed33c922b8d1 +Author: Marcin Słowiak +Date: Sat Oct 10 18:13:15 2020 +0200 + + Issue #182: Fix package location for controllers unit tests + +commit 9124a8068614958a0177cf1178d865ff721e0abd +Author: Marcin Słowiak +Date: Sat Oct 10 18:12:32 2020 +0200 + + Issue #182: Remove integration tests + +commit 609ba5ce30d434852c357a643a89d3f4a9fda7ce +Author: Marcin Słowiak +Date: Sat Oct 10 18:11:11 2020 +0200 + + Issue #170: Add default server as localhost + +commit d59859c2927d7875f6704ad078f27b00de917772 +Author: Marcin Słowiak +Date: Sat Oct 10 11:08:08 2020 +0200 + + Update CONTRIBUTING.md + +commit 1e841b967bdb51abea5fe58870c472249db3ad6e +Merge: 6a6b1b7 7f79866 +Author: Marcin Słowiak +Date: Sat Oct 10 10:32:00 2020 +0200 + + Merge pull request #177 from HemantJoshi11/168--code_style + + Issue #168: Add info about code style to CONTRIBUTING.md + +commit 7f798669240e5389d7b4d4a9bfe173b8bf35cf99 +Author: Hemant Joshi <33864446+HemantJoshi11@users.noreply.github.com> +Date: Sat Oct 10 13:59:08 2020 +0530 + + Update CONTRIBUTING.md + +commit c8c9249badd223df66a95dd6ee60fc2185662c5f +Author: Edwin Ramirez Ventura +Date: Fri Oct 9 19:34:53 2020 -0400 + + Add /payments post path to api.yaml + +commit 16f4cc53424b75e8858b6a8e768d0157d7c4e617 +Author: Marcin Słowiak +Date: Fri Oct 9 21:43:20 2020 +0200 + + Issue #170: Add name variable as required in CreateUserRequest + +commit b292c03615a96258e821e78cbdac27aa013f2c5f +Author: Marcin Słowiak +Date: Fri Oct 9 21:41:54 2020 +0200 + + Issue #170: Remove unused models that were replaced by generated code + +commit ce36e83363a8583444ebca6aeac1333731262101 +Author: Hemant Joshi +Date: Sat Oct 10 00:56:52 2020 +0530 + + Issue 168: Add info about code style to CONTRIBUTING.md + +commit 749e108b6194272b75b48295b066b90145f63ad3 +Author: Marcin Słowiak +Date: Fri Oct 9 21:26:18 2020 +0200 + + Issue #170: Fix unit tests for UsersController + +commit f934d53af73def51c92a9e830ebcc0a6720c36bb +Author: Marcin Słowiak +Date: Fri Oct 9 21:07:21 2020 +0200 + + Issue #170: Convert GET /users/{userId} to yaml specification + +commit 7c28816069cedd2b4b824d7730c572b7bc9e70bd +Author: Marcin Słowiak +Date: Fri Oct 9 20:58:46 2020 +0200 + + Issue #170: Add GET /users with Spring Pageable as a custom solution + +commit 29c7d9bb4feaebceb3fe03e1c76bdcae45f3cbf2 +Author: Marcin Słowiak +Date: Fri Oct 9 20:19:57 2020 +0200 + + Issue #170: Do not create default method implementation in generated interfaces + +commit 4ebba85c9c18f72a42847b6214fe742c34cd2a48 +Author: Marcin Słowiak +Date: Fri Oct 9 20:16:21 2020 +0200 + + Issue #170: Bump OpenApi version to 5.0.0-beta2 to have Set collections + +commit cf65150f9931b26e40cffed490fb231cfa0f43d3 +Author: Marcin Słowiak +Date: Fri Oct 9 19:48:26 2020 +0200 + + Issue #170: Convert POST /users endpoint to OpenApi yaml schema + +commit 9b5808bdda89d28e92085f0449768628af2da2e2 +Author: Marcin Słowiak +Date: Wed Oct 7 19:40:51 2020 +0200 + + Issue #170: Add interface only option to generator config + +commit 6a6b1b7b00558e5aab35f8ffd54295a24411ccb7 +Merge: d9baa06 65e3967 +Author: Prathab +Date: Thu Oct 8 11:00:57 2020 +0530 + + Merge pull request #163 from jufab/feature/158--DataLoader-class-does-nothing + + Issue #158: DataLoader class does nothing + +commit 65e3967b636ca3db27ebdaf37c2dfdf3c8a0546e +Author: Julien FABRE +Date: Wed Oct 7 21:27:48 2020 +0200 + + Issue #158: DataLoader class does nothing + +commit d9baa0625bda08953d193fcbb0f40331265d37c3 +Author: Prathab Murugan +Date: Wed Oct 7 21:50:48 2020 +0530 + + Add Social Login to FEATURES.md + +commit 24c484c8450c5b3d5a3c8b2aabfb9ddcf722942a +Merge: da04d54 099f02f +Author: Marcin Słowiak +Date: Mon Oct 5 12:38:01 2020 +0200 + + Merge pull request #154 from tomsajuk/master + + Issue #149 : Add current user as Admin when creating a community + +commit 099f02f8c3c74e2d119905c449aa30e05e07e808 +Author: tomsajuk +Date: Mon Oct 5 08:40:25 2020 +0530 + + Issue #149: Add current user as Admin when creating a community + +commit da04d543e7f9ec1f907ce5ca4c07fb652f543dbc +Author: Prathab Murugan +Date: Sun Oct 4 12:49:55 2020 +0530 + + Update Copyright and Features doc + + * Marked completed features in FEATURES.md + * Update copyright for all files + +commit 228b7a39e61bafa58e3814388e6ce3f732f8ea38 +Author: Prathab Murugan +Date: Sun Oct 4 11:37:01 2020 +0530 + + Code formatting + + Formatting codebase with style guide from Square + +commit 5914e6179540c6db93b2df437bda17eb5971feb1 +Merge: 3e1a3b9 0b3497b +Author: Prathab +Date: Sat Oct 3 10:14:05 2020 +0530 + + Merge pull request #148 from jmprathab/feature/issue-147--openapi-specs-generation + + Issue 147: OpenApi specs generation + +commit 0b3497b563d34133ba9ba81f9ed1a1bd267bb000 +Author: Marcin Słowiak +Date: Fri Oct 2 22:19:30 2020 +0200 + + Issue #147: Fix test assertNotNull import + +commit b4cf703aff38c9a1887f4f8d0548f58932a451d7 +Author: Marcin Słowiak +Date: Fri Oct 2 22:19:08 2020 +0200 + + Issue #147: Add api module with OpenApi schema and generator part + +commit 3e1a3b96cfdd0c786efc338e86c5c5ce7f1358b2 +Merge: b3e3292 4734714 +Author: Prathab +Date: Fri Oct 2 21:34:21 2020 +0530 + + Merge pull request #146 from mslowiak/feature/multi-module-project + + Reorganize project to be multi module + +commit 4734714118c046e6d44d30acf88441cdf183ca14 +Author: Marcin Słowiak +Date: Fri Oct 2 17:58:40 2020 +0200 + + Update project after amenity rebranding + +commit 134a974a1ebc9179ca701ca1290d319641db07a3 +Author: Marcin Słowiak +Date: Thu Oct 1 22:42:08 2020 +0200 + + Reorganize project to be multi module + +commit b3e3292e5af40db29a0ab7f41e21726914701b63 +Merge: 22f9c82 d7f1729 +Author: Prathab +Date: Fri Oct 2 11:48:22 2020 +0530 + + Merge pull request #144 from edwardUL99/feature/111--Update_amenity_endpoint + + Issue 111: Endpoint for updating an amenity + +commit d7f1729af7f3d31c6a1e30ea60c9596131bec16f +Author: Edward Lynch-Milner <18222021@studentmail.ul.ie> +Date: Thu Oct 1 23:43:02 2020 +0100 + + Fixed update amenity NULL issue + +commit f400ff74ac3492839c50792c8ed108f3f73d8d3e +Merge: 5d98df0 22f9c82 +Author: Edward Lynch-Milner <18222021@studentmail.ul.ie> +Date: Thu Oct 1 23:36:47 2020 +0100 + + Merge branch 'master' of github.com:jmprathab/MyHome + +commit 22f9c82a5783fceb9f6cebe30f163c24b2184f71 +Merge: 2bed1cd b197906 +Author: Prathab +Date: Tue Sep 29 20:28:42 2020 +0530 + + Merge pull request #145 from mslowiak/feature/issue-108--add-amenity-to-community + + Issue #108: Add amenity to community + +commit 5d98df0af98384522a8a3611575ec906e6b94518 +Merge: c6972c1 7a67381 +Author: Edward Lynch-Milner <18222021@studentmail.ul.ie> +Date: Sun Sep 27 22:15:33 2020 +0100 + + Merge branch 'feature/111--Update_amenity_endpoint' of https://github.com/edwardUL99/MyHome into feature/111--Update_amenity_endpoint + +commit c6972c1f7892c7a1a81c800a9d1d0471e4c31892 +Author: Edward Lynch-Milner <18222021@studentmail.ul.ie> +Date: Sun Sep 27 22:15:20 2020 +0100 + + Code changes based on @mslowiak's reviews + +commit b197906dc421fbb1f0ecc567695cf664978f6353 +Author: Marcin Słowiak +Date: Sat Sep 26 16:37:29 2020 +0200 + + Issue #108: Fix data.sql + +commit e7ef0b83185aa07bdd37749442c6102e768b344e +Author: Marcin Słowiak +Date: Sat Sep 26 16:27:29 2020 +0200 + + Issue #108: Add unit tests + +commit 051f4b24550ca39c1bb75706fa2b4b8bcc21865c +Author: Marcin Słowiak +Date: Sat Sep 26 15:39:46 2020 +0200 + + Issue #108: Add amenity to community + +commit 911b3a9f7ef7586d86c335ed848fc4a52081ba66 +Author: Marcin Słowiak +Date: Sat Sep 26 12:02:12 2020 +0200 + + Issue #108: Rename CommunityAmenity to Amenity in all places + +commit 2bed1cd045caed5614699abe5d3ed2723da95fbb +Merge: 493ea91 ef7631f +Author: Prathab +Date: Tue Sep 22 16:38:26 2020 +0530 + + Merge pull request #143 from DDmit04/feature/119--hibernate-query-perfomance + + Issue 119: Community hibernate query perfomance + +commit ef7631f316bbbf6e8b1bc24ddd1631a007a81c86 +Author: Дмитроченков Даниил Андреевич +Date: Thu Sep 17 14:29:44 2020 +0300 + + improve tests + +commit 7a6738159910390b0b11482a70b11dd364c9f799 +Merge: 9ed1f71 493ea91 +Author: Edward Lynch-Milner <47575833+edwardUL99@users.noreply.github.com> +Date: Mon Sep 14 19:33:31 2020 +0100 + + Merge branch 'master' into feature/111--Update_amenity_endpoint + +commit 9ed1f719174bbc33049943f517d25c106f179a55 +Author: Edward Lynch-Milner <18222021@studentmail.ul.ie> +Date: Mon Sep 14 19:24:08 2020 +0100 + + Finished coding and testing for issue #111 + +commit 039126b2aaecb8c51d178848cd36ffede54e303e +Author: Дмитроченков Даниил Андреевич +Date: Mon Sep 14 19:54:17 2020 +0300 + + fix tests + +commit 61ee0b6da85e70082f39193e2b17c9efe869c4bf +Author: Дмитроченков Даниил Андреевич +Date: Mon Sep 14 19:53:51 2020 +0300 + + fix CommunitySDJpaService + +commit 2151c1f4c8b5fa212b0ac40ffc979580df2f3439 +Merge: c2f0cff 493ea91 +Author: DDmit04 <46588421+DDmit04@users.noreply.github.com> +Date: Mon Sep 14 17:39:38 2020 +0300 + + Merge branch 'master' into feature/119--hibernate-query-perfomance + +commit 493ea91fb79459dfa8a543752c76fbf70a3f0241 +Merge: 7c7ace4 3427dcd +Author: Prathab +Date: Mon Sep 14 18:43:49 2020 +0530 + + Merge pull request #141 from edwardUL99/feature/140--CommunitySDJpaServiceTest_deleteCommunity_fails + + Issue 140: CommunitySDJpaServiceTest deleteCommunity fails + +commit 3427dcdc701accc2b1abc2b6612de7a96d291e10 +Merge: 8e41750 d3d87a3 +Author: Edward Lynch-Milner <18222021@studentmail.ul.ie> +Date: Thu Sep 10 20:10:16 2020 +0100 + + Rebasing + +commit 8e41750a0f0daac9846eeb937f8dfe898cf5a966 +Author: Edward Lynch-Milner <18222021@studentmail.ul.ie> +Date: Thu Sep 3 08:17:09 2020 +0100 + + Added one more unit test for PaymentController + +commit de7dba9859593f64ea088e96e5154db552381bc9 +Author: Edward Lynch-Milner <18222021@studentmail.ul.ie> +Date: Wed Sep 2 23:46:04 2020 +0100 + + Changed communityOptional.isPresent in CommunityController.removeCommunityHouse to filer and map + +commit 18ebb4a4346bb21b50f4bdc67eedcb41d37956ea +Author: Edward Lynch-Milner <18222021@studentmail.ul.ie> +Date: Mon Aug 31 20:44:23 2020 +0100 + + Fixed CommunitySDJpaServiceTest + +commit 3df0a8ce0565fc163494b9d826072f7c86143821 +Author: Edward Lynch-Milner <18222021@studentmail.ul.ie> +Date: Wed Sep 2 19:40:16 2020 +0100 + + Fixed all code review items and errors + +commit d3d87a35ec3d1abe67f0a75b49b5a27d06d1cf10 +Merge: ab8c270 7c7ace4 +Author: Edward Lynch-Milner <47575833+edwardUL99@users.noreply.github.com> +Date: Mon Sep 7 20:31:19 2020 +0100 + + Merge branch 'master' into feature/140--CommunitySDJpaServiceTest_deleteCommunity_fails diff --git a/service/src/main/java/com/myhome/controllers/AmenityController.java b/service/src/main/java/com/myhome/controllers/AmenityController.java index 5df52ec2..0f76accd 100644 --- a/service/src/main/java/com/myhome/controllers/AmenityController.java +++ b/service/src/main/java/com/myhome/controllers/AmenityController.java @@ -31,7 +31,6 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; @@ -94,15 +93,4 @@ public ResponseEntity updateAmenity(@PathVariable String amenityId, return ResponseEntity.status(HttpStatus.NOT_FOUND).build(); } } - - // TODO: Move to api.yaml - @DeleteMapping(path = "/bookings/{bookingId}") - public ResponseEntity deleteBooking(@PathVariable String bookingId) { - boolean isBookingDeleted = amenitySDJpaService.deleteBooking(bookingId); - if (isBookingDeleted) { - return ResponseEntity.status(HttpStatus.NO_CONTENT).build(); - } else { - return ResponseEntity.status(HttpStatus.NOT_FOUND).build(); - } - } } diff --git a/service/src/main/java/com/myhome/controllers/BookingController.java b/service/src/main/java/com/myhome/controllers/BookingController.java new file mode 100644 index 00000000..e9763925 --- /dev/null +++ b/service/src/main/java/com/myhome/controllers/BookingController.java @@ -0,0 +1,29 @@ +package com.myhome.controllers; + +import com.myhome.api.BookingsApi; +import com.myhome.services.BookingService; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@Slf4j +@RequiredArgsConstructor +public class BookingController implements BookingsApi { + + private final BookingService bookingSDJpaService; + + @Override + public ResponseEntity deleteBooking(@PathVariable String amenityId, + @PathVariable String bookingId) { + boolean isBookingDeleted = bookingSDJpaService.deleteBooking(bookingId); + if (isBookingDeleted) { + return ResponseEntity.status(HttpStatus.NO_CONTENT).build(); + } else { + return ResponseEntity.status(HttpStatus.NOT_FOUND).build(); + } + } +} diff --git a/service/src/main/java/com/myhome/services/AmenityService.java b/service/src/main/java/com/myhome/services/AmenityService.java index 8da143b6..6f424ece 100644 --- a/service/src/main/java/com/myhome/services/AmenityService.java +++ b/service/src/main/java/com/myhome/services/AmenityService.java @@ -33,6 +33,4 @@ public interface AmenityService { Set listAllAmenities(String communityId); boolean updateAmenity(AmenityDto updatedAmenityDto); - - boolean deleteBooking(String bookingId); } diff --git a/service/src/main/java/com/myhome/services/BookingService.java b/service/src/main/java/com/myhome/services/BookingService.java new file mode 100644 index 00000000..b65aa29d --- /dev/null +++ b/service/src/main/java/com/myhome/services/BookingService.java @@ -0,0 +1,7 @@ +package com.myhome.services; + +public interface BookingService { + + boolean deleteBooking(String bookingId); + +} diff --git a/service/src/main/java/com/myhome/services/springdatajpa/AmenitySDJpaService.java b/service/src/main/java/com/myhome/services/springdatajpa/AmenitySDJpaService.java index b6e7a8c2..71a79f3b 100644 --- a/service/src/main/java/com/myhome/services/springdatajpa/AmenitySDJpaService.java +++ b/service/src/main/java/com/myhome/services/springdatajpa/AmenitySDJpaService.java @@ -20,7 +20,6 @@ import com.myhome.domain.Amenity; import com.myhome.domain.Community; import com.myhome.model.AmenityDto; -import com.myhome.repositories.AmenityBookingItemRepository; import com.myhome.repositories.AmenityRepository; import com.myhome.repositories.CommunityRepository; import com.myhome.services.AmenityService; @@ -41,7 +40,6 @@ public class AmenitySDJpaService implements AmenityService { private final CommunityRepository communityRepository; private final CommunityService communityService; private final AmenityApiMapper amenityApiMapper; - private final AmenityBookingItemRepository bookingRepository; @Override public Optional> createAmenities(Set amenities, String communityId) { @@ -104,14 +102,4 @@ public boolean updateAmenity(AmenityDto updatedAmenity) { .orElse(null)) .map(amenityRepository::save).isPresent(); } - - @Override - public boolean deleteBooking(String bookingId) { - return bookingRepository.findByAmenityBookingItemId(bookingId) - .map(bookingItem -> { - bookingRepository.delete(bookingItem); - return true; - }) - .orElse(false); - } } diff --git a/service/src/main/java/com/myhome/services/springdatajpa/BookingSDJpaService.java b/service/src/main/java/com/myhome/services/springdatajpa/BookingSDJpaService.java new file mode 100644 index 00000000..38854ae5 --- /dev/null +++ b/service/src/main/java/com/myhome/services/springdatajpa/BookingSDJpaService.java @@ -0,0 +1,23 @@ +package com.myhome.services.springdatajpa; + +import com.myhome.repositories.AmenityBookingItemRepository; +import com.myhome.services.BookingService; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; + +@Service +@RequiredArgsConstructor +public class BookingSDJpaService implements BookingService { + + private final AmenityBookingItemRepository bookingRepository; + + @Override + public boolean deleteBooking(String bookingId) { + return bookingRepository.findByAmenityBookingItemId(bookingId) + .map(bookingItem -> { + bookingRepository.delete(bookingItem); + return true; + }) + .orElse(false); + } +} diff --git a/service/src/test/java/com/myhome/controllers/AmenityControllerTest.java b/service/src/test/java/com/myhome/controllers/AmenityControllerTest.java index bd59d9d5..13f263be 100644 --- a/service/src/test/java/com/myhome/controllers/AmenityControllerTest.java +++ b/service/src/test/java/com/myhome/controllers/AmenityControllerTest.java @@ -50,7 +50,6 @@ class AmenityControllerTest { private final String TEST_AMENITY_ID = "test-amenity-id"; private final String TEST_AMENITY_DESCRIPTION = "test-amenity-description"; private final String TEST_COMMUNITY_ID = "1"; - private static final String TEST_BOOKING_ID = "test-booking-id"; @Mock private AmenityService amenitySDJpaService; @@ -220,36 +219,6 @@ void shouldNotUpdateCommunityAmenityIfAmenityNotExists() { verify(amenitySDJpaService).updateAmenity(amenityDto); } - @Test - void deleteBooking() { - // given - given(amenitySDJpaService.deleteBooking(TEST_BOOKING_ID)) - .willReturn(true); - - // when - ResponseEntity response = amenityController.deleteBooking(TEST_BOOKING_ID); - - // then - assertNull(response.getBody()); - assertEquals(HttpStatus.NO_CONTENT, response.getStatusCode()); - verify(amenitySDJpaService).deleteBooking(TEST_BOOKING_ID); - } - - @Test - void deleteBookingNotExists() { - // given - given(amenitySDJpaService.deleteBooking(TEST_BOOKING_ID)) - .willReturn(false); - - // when - ResponseEntity response = amenityController.deleteBooking(TEST_BOOKING_ID); - - // then - assertNull(response.getBody()); - assertEquals(HttpStatus.NOT_FOUND, response.getStatusCode()); - verify(amenitySDJpaService).deleteBooking(TEST_BOOKING_ID); - } - private Amenity getTestAmenity() { return new Amenity() .withAmenityId(TEST_AMENITY_ID) diff --git a/service/src/test/java/com/myhome/controllers/BookingControllerTest.java b/service/src/test/java/com/myhome/controllers/BookingControllerTest.java new file mode 100644 index 00000000..304bd937 --- /dev/null +++ b/service/src/test/java/com/myhome/controllers/BookingControllerTest.java @@ -0,0 +1,64 @@ +package com.myhome.controllers; + +import com.myhome.services.BookingService; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.mockito.BDDMockito.given; +import static org.mockito.Mockito.verify; + +public class BookingControllerTest { + + private final String TEST_AMENITY_ID = "test-amenity-id"; + private static final String TEST_BOOKING_ID = "test-booking-id"; + + @Mock + private BookingService bookingSDJpaService; + + @InjectMocks + private BookingController bookingController; + + @BeforeEach + private void init() { + MockitoAnnotations.initMocks(this); + } + + @Test + void deleteBooking() { + // given + given(bookingSDJpaService.deleteBooking(TEST_BOOKING_ID)) + .willReturn(true); + + // when + ResponseEntity response = + bookingController.deleteBooking(TEST_AMENITY_ID, TEST_BOOKING_ID); + + // then + assertNull(response.getBody()); + assertEquals(HttpStatus.NO_CONTENT, response.getStatusCode()); + verify(bookingSDJpaService).deleteBooking(TEST_BOOKING_ID); + } + + @Test + void deleteBookingNotExists() { + // given + given(bookingSDJpaService.deleteBooking(TEST_BOOKING_ID)) + .willReturn(false); + + // when + ResponseEntity response = + bookingController.deleteBooking(TEST_AMENITY_ID, TEST_BOOKING_ID); + + // then + assertNull(response.getBody()); + assertEquals(HttpStatus.NOT_FOUND, response.getStatusCode()); + verify(bookingSDJpaService).deleteBooking(TEST_BOOKING_ID); + } +} diff --git a/service/src/test/java/com/myhome/services/unit/AmenitySDJpaServiceTest.java b/service/src/test/java/com/myhome/services/unit/AmenitySDJpaServiceTest.java index 81463501..e9babf12 100644 --- a/service/src/test/java/com/myhome/services/unit/AmenitySDJpaServiceTest.java +++ b/service/src/test/java/com/myhome/services/unit/AmenitySDJpaServiceTest.java @@ -18,10 +18,8 @@ import com.myhome.controllers.mapper.AmenityApiMapper; import com.myhome.domain.Amenity; -import com.myhome.domain.AmenityBookingItem; import com.myhome.domain.Community; import com.myhome.model.AmenityDto; -import com.myhome.repositories.AmenityBookingItemRepository; import com.myhome.repositories.AmenityRepository; import com.myhome.repositories.CommunityRepository; import com.myhome.services.CommunityService; @@ -54,7 +52,6 @@ class AmenitySDJpaServiceTest { private static final String TEST_AMENITY_NAME = "test-amenity-name"; private static final BigDecimal TEST_AMENITY_PRICE = BigDecimal.valueOf(1); - private static final String TEST_BOOKING_ID = "test-booking-id"; private final String TEST_AMENITY_ID = "test-amenity-id"; private final String TEST_AMENITY_DESCRIPTION = "test-amenity-description"; private final String TEST_COMMUNITY_ID = "test-community-id"; @@ -67,8 +64,6 @@ class AmenitySDJpaServiceTest { private CommunityService communityService; @Mock private AmenityApiMapper amenityApiMapper; - @Mock - private AmenityBookingItemRepository bookingItemRepository; @InjectMocks private AmenitySDJpaService amenitySDJpaService; @@ -296,38 +291,6 @@ void shouldNotUpdateAmenityIfCommunityDoesNotExist() { verifyNoMoreInteractions(amenityRepository); } - @Test - void deleteBookingItem() { - // given - AmenityBookingItem testBookingItem = getTestBookingItem(); - - given(bookingItemRepository.findByAmenityBookingItemId(TEST_BOOKING_ID)) - .willReturn(Optional.of(testBookingItem)); - - // when - boolean bookingDeleted = amenitySDJpaService.deleteBooking(TEST_BOOKING_ID); - - // then - assertTrue(bookingDeleted); - verify(bookingItemRepository).findByAmenityBookingItemId(TEST_BOOKING_ID); - verify(bookingItemRepository).delete(testBookingItem); - } - - @Test - void deleteBookingNotExists() { - // given - given(bookingItemRepository.findByAmenityBookingItemId(TEST_BOOKING_ID)) - .willReturn(Optional.empty()); - - // when - boolean amenityDeleted = amenitySDJpaService.deleteBooking(TEST_BOOKING_ID); - - // then - assertFalse(amenityDeleted); - verify(bookingItemRepository).findByAmenityBookingItemId(TEST_BOOKING_ID); - verify(bookingItemRepository, never()).delete(any()); - } - private AmenityDto getTestAmenityDto() { Long TEST_AMENITY_ENTITY_ID = 1L; @@ -349,9 +312,4 @@ private Amenity getUpdatedCommunityAmenity() { .withDescription(communityAmenityDto.getDescription()) .withCommunity(TestUtils.CommunityHelpers.getTestCommunity()); } - - private AmenityBookingItem getTestBookingItem() { - return new AmenityBookingItem() - .withAmenityBookingItemId(TEST_BOOKING_ID); - } } \ No newline at end of file diff --git a/service/src/test/java/com/myhome/services/unit/BookingSDJpaServiceTest.java b/service/src/test/java/com/myhome/services/unit/BookingSDJpaServiceTest.java new file mode 100644 index 00000000..3e2d3c34 --- /dev/null +++ b/service/src/test/java/com/myhome/services/unit/BookingSDJpaServiceTest.java @@ -0,0 +1,71 @@ +package com.myhome.services.unit; + +import com.myhome.domain.AmenityBookingItem; +import com.myhome.repositories.AmenityBookingItemRepository; +import com.myhome.services.springdatajpa.BookingSDJpaService; +import java.util.Optional; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; + +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.BDDMockito.given; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.verify; + +public class BookingSDJpaServiceTest { + + private static final String TEST_BOOKING_ID = "test-booking-id"; + + @Mock + private AmenityBookingItemRepository bookingItemRepository; + + @InjectMocks + private BookingSDJpaService bookingSDJpaService; + + @BeforeEach + private void init() { + MockitoAnnotations.initMocks(this); + } + + @Test + void deleteBookingItem() { + // given + AmenityBookingItem testBookingItem = getTestBookingItem(); + + given(bookingItemRepository.findByAmenityBookingItemId(TEST_BOOKING_ID)) + .willReturn(Optional.of(testBookingItem)); + + // when + boolean bookingDeleted = bookingSDJpaService.deleteBooking(TEST_BOOKING_ID); + + // then + assertTrue(bookingDeleted); + verify(bookingItemRepository).findByAmenityBookingItemId(TEST_BOOKING_ID); + verify(bookingItemRepository).delete(testBookingItem); + } + + @Test + void deleteBookingNotExists() { + // given + given(bookingItemRepository.findByAmenityBookingItemId(TEST_BOOKING_ID)) + .willReturn(Optional.empty()); + + // when + boolean bookingDeleted = bookingSDJpaService.deleteBooking(TEST_BOOKING_ID); + + // then + assertFalse(bookingDeleted); + verify(bookingItemRepository).findByAmenityBookingItemId(TEST_BOOKING_ID); + verify(bookingItemRepository, never()).delete(any()); + } + + private AmenityBookingItem getTestBookingItem() { + return new AmenityBookingItem() + .withAmenityBookingItemId(TEST_BOOKING_ID); + } +} From e1beacbd81ceaf5a7ab43c00f0cdc0dd436ee208 Mon Sep 17 00:00:00 2001 From: hsergiu <57728877+hsergiu@users.noreply.github.com> Date: Sun, 14 Mar 2021 11:33:22 +0200 Subject: [PATCH 2/4] Issue #220: cleanup --- dd | 1605 ------------------------------------------------------------ 1 file changed, 1605 deletions(-) delete mode 100644 dd diff --git a/dd b/dd deleted file mode 100644 index 34fbb180..00000000 --- a/dd +++ /dev/null @@ -1,1605 +0,0 @@ -commit c123298cca0f583728136bb75510c4830ac7702e (HEAD -> master, upstream/master) -Merge: 4a2d165 4b5a837 -Author: Marcin Słowiak -Date: Wed Mar 10 09:48:12 2021 +0100 - - Merge pull request #256 from jmprathab/feature/issue-233--fix-community-tag - - Issue #233: Move endpoints related to amenities from community tag - -commit 4b5a83746704d1a486e395c47922a4209dcc1c6d -Author: JanneSickert -Date: Wed Mar 3 18:34:20 2021 +0100 - - Issue #233: Move endpoints related to amenities from community tag - -commit 4a2d165ad84619ce6f693429fae3e4ea944da215 -Merge: bbaf696 ab64171 -Author: Marcin Słowiak -Date: Sat Mar 6 20:49:18 2021 +0100 - - Merge pull request #254 from hsergiu/feature/issue-231--move-payment-endpoint-from-communities - - Issue #231: Move endpoint related to payments from communities tag to payments - -commit ab64171763311644068e3c0f2e72311d43e75b29 (origin/feature/issue-231--move-payment-endpoint-from-communities, feature/issue-231--move-payment-endpoint-from-communities) -Author: hsergiu <57728877+hsergiu@users.noreply.github.com> -Date: Sat Mar 6 15:49:34 2021 +0200 - - Issue #231: renamed test variable - -commit 5eb81e03123be767917829c9883b5b67ac9032cc -Author: hsergiu <57728877+hsergiu@users.noreply.github.com> -Date: Sat Mar 6 15:36:02 2021 +0200 - - Issue #231: Move endpoint related to payments from communities to payments - -commit bbaf69626ad1f07c2ae8174710beb8cb6fd3e972 (origin/master, origin/HEAD) -Merge: 9fed2c5 4a1a2e4 -Author: Marcin Słowiak -Date: Fri Mar 5 15:40:55 2021 +0100 - - Merge pull request #216 from DDmit04/feature/196--Email-templates - - Issue #196: email templates - -commit 9fed2c58dac7f476520c318e5fbc8ec508d74703 -Merge: f7ec6a4 b7adca1 -Author: Marcin Słowiak -Date: Wed Mar 3 22:01:44 2021 +0100 - - Merge pull request #251 from hsergiu/feature/issue-243--unit-tests-for-login-endpoint - -commit b7adca17f6904db93e40fb390182644a72b6faa7 (origin/feature/issue-243--unit-tests-for-login-endpoint) -Author: hsergiu <> -Date: Wed Mar 3 22:53:00 2021 +0200 - - Issue #243: adjust fields in AuthenticationSDJpaService - -commit 17f9028a1490938c3b1072c6832e3fb3a0bde7b4 -Author: hsergiu <> -Date: Wed Mar 3 11:47:53 2021 +0200 - - Issue #243: build fix - -commit 9ea4c19692561edba676c939c9497da663e0d83d -Merge: 11b192e f7ec6a4 -Author: hsergiu <> -Date: Wed Mar 3 11:05:28 2021 +0200 - - Merge update - -commit 11b192e1124348daefa4b3d1d0d55c74f6c77f99 -Author: hsergiu <> -Date: Wed Mar 3 10:53:54 2021 +0200 - - Issue #243: improve code - -commit f7ec6a40e40ea8056915faf7fcb1b009f5dd6483 -Merge: d4b1ba3 62ac7b3 -Author: Marcin Słowiak -Date: Tue Mar 2 16:10:51 2021 +0100 - - Merge pull request #252 from rrohak/patch-1 - - Update README.md: Added table of contents & links - -commit 62ac7b3a76db0c03e1ab1cc98d98416d0311928c -Author: rrohak <43389183+rrohak@users.noreply.github.com> -Date: Tue Mar 2 02:24:34 2021 -0500 - - Update README.md: Added table of contents & links - - Previously the readme did not have a table of contents to easily move through the page, or to easily link a heading. Also, the readme did not include a link to contributing.md, only that people should read it. - -commit 962b5b692493d21dfa7fcb1395da548812de1086 -Author: hsergiu <> -Date: Mon Mar 1 14:47:10 2021 +0200 - - Issue #243: add unit tests for AuthenticationController, AuthenticationSDJpaService, UserSDJpaService (method findUserByEmail) - -commit d4b1ba354b2058371b5c91a0d85c85fff90b5cf6 -Merge: f530767 862c62a -Author: Marcin Słowiak -Date: Sun Feb 28 10:41:02 2021 +0100 - - Merge pull request #250 from JanneSickert/master - - Issue #221: Update OpenApi to 5.0.1 - -commit 862c62a04365f973e8bec322db6f2fc30c1375a5 -Author: JanneSickert -Date: Sat Feb 27 19:46:19 2021 +0100 - - Issue #221: Update OpenApi to 5.0.1 - -commit 4a1a2e4aa1f79ab315ba2567a7c96e737a2855bf -Author: Дмитроченков Даниил Андреевич -Date: Thu Feb 25 01:45:40 2021 +0300 - - Issue #196 fix test - -commit cc793f09c6f0d884672e9b6fe9067ee9f8bf476c -Author: Дмитроченков Даниил Андреевич -Date: Thu Feb 25 01:45:25 2021 +0300 - - Issue #196 clean up - -commit 9c0f6926ae9e7bea18ccdcf3e23b331da180b232 -Author: Дмитроченков Даниил Андреевич -Date: Thu Feb 25 01:35:41 2021 +0300 - - Issue #196 restore locales and templates - -commit 0a034f25633a10a969243626b5be9053a91f334d -Author: Дмитроченков Даниил Андреевич -Date: Thu Feb 25 01:21:35 2021 +0300 - - Issue #196 little fixes - -commit f0eeb7fab5205cc45b08210a5e10c727f10837a3 -Author: Дмитроченков Даниил Андреевич -Date: Thu Feb 25 01:20:28 2021 +0300 - - Issue #196 fix email templates names - -commit b2a0461e182aa1f425e99311c7986dd791e716a1 -Author: Дмитроченков Даниил Андреевич -Date: Wed Feb 24 23:32:15 2021 +0300 - - Issue #196 fix error - -commit 63b84d0208647a45baff29a7de2d413b07e32107 -Author: Дмитроченков Даниил Андреевич -Date: Wed Feb 24 21:31:52 2021 +0300 - - Issue #196 rename mail prop - -commit 4f6bfc636b4701cd864805b6bd643861b088a476 -Author: Дмитроченков Даниил Андреевич -Date: Wed Feb 24 21:30:16 2021 +0300 - - Issue #196 fix tests - -commit 3f5fabaf97172c13c9cdc0c6922e0f4451fe2c2f -Author: Дмитроченков Даниил Андреевич -Date: Wed Feb 24 21:28:33 2021 +0300 - - Issue #196 separate Email properties to several classes - -commit 3872ea44cdbebb2e44832e783bed8d3ab74d5d79 -Author: Дмитроченков Даниил Андреевич -Date: Wed Feb 24 21:27:19 2021 +0300 - - Issue #196 turn `templateNames` from props to Enum - -commit 8d8d930380d890649ef36e049c61694bd2745f70 -Author: Дмитроченков Даниил Андреевич -Date: Wed Feb 24 21:26:27 2021 +0300 - - Issue #196 mov `template` and `localization` outside spring.mail - -commit 3b119579229b7f60254c823bb8826ae4bd23921e -Author: Дмитроченков Даниил Андреевич -Date: Tue Feb 23 00:29:08 2021 +0300 - - Issue #196 fix integration test - -commit 9bdebff444608d1465fa451d7fa3f2c256c0706f -Author: Дмитроченков Даниил Андреевич -Date: Mon Feb 22 23:24:37 2021 +0300 - - Issue #196 fix reflection using in tests - -commit fb1e5aba704359f3cff2d3cb337ebb9f15f3dd35 -Author: Дмитроченков Даниил Андреевич -Date: Mon Feb 22 19:30:09 2021 +0300 - - Issue #196 replace '@Value' with '@ConfigurationProperties' for mail props - -commit 67aa4b5721286aa6dd6c15aeac71f21dad4d2b8f -Author: Дмитроченков Даниил Андреевич -Date: Wed Jan 6 02:51:00 2021 +0300 - - Issue #196 fix tests - -commit fd915e184e2f747ce4d42f39eb1e0a6d7f92ab59 -Author: Дмитроченков Даниил Андреевич -Date: Wed Jan 6 01:57:17 2021 +0300 - - Issue #196 update MailService - -commit ece446c6493db8a179fa4da704a6ac3600ac5c80 -Author: Дмитроченков Даниил Андреевич -Date: Wed Feb 24 23:24:05 2021 +0300 - - Issue #196 add thymeleaf templates - -commit f5307676a860b60d996237e17fed50e89d379589 -Merge: ad8669e 9683502 -Author: Marcin Słowiak -Date: Tue Feb 23 17:32:00 2021 +0100 - - Merge pull request #249 from JanneSickert/master - - Issue #224: Divide postman collection into directories - -commit 9683502d6d434a11bc80f7cabbf7bb804ea059eb -Author: JanneSickert -Date: Tue Feb 23 15:40:55 2021 +0100 - - Issue #224: Divide postman collection into directories - -commit 04e5ff9c60ac38b7bb2788d1894ed9af00a1d37b -Author: Дмитроченков Даниил Андреевич -Date: Wed Jan 6 01:56:03 2021 +0300 - - Issue #196 add locales files - -commit 818c7594e15729ba0825fcb50326d5540f0af9c5 -Author: Дмитроченков Даниил Андреевич -Date: Wed Jan 6 01:55:07 2021 +0300 - - Issue #196 add email templates configs - -commit ad8669ecd6fac97e07697be9a9c4874319c01e31 -Author: Marcin Słowiak -Date: Sun Feb 21 20:31:15 2021 +0100 - - Fix integration test after #246 - -commit c50b5ffdab1cbe5a03b41ec4b4c104df1e88ad5f -Merge: b58e768 1903552 -Author: Marcin Słowiak -Date: Sun Feb 21 20:08:09 2021 +0100 - - Merge pull request #246 from jmprathab/feature/fixSecurityMatchers - - Fix security matchers - -commit 190355211e693c051e24af63cc860aa1bf559693 -Author: Marcin Słowiak -Date: Sun Feb 21 20:05:06 2021 +0100 - - Fix security matchers - -commit b58e768a7e3310884d2e1bbb2da7d5ae91e4c779 -Merge: 251450d bb449ef -Author: Marcin Słowiak -Date: Sun Feb 21 19:39:56 2021 +0100 - - Merge pull request #244 from jmprathab/feature/issue-234--addAuthorizationHeaderToOpenApiSpecs - - Issue #234: Add Authorization header to OpenApi specs - -commit 251450db7fc233950d559726a540a268ec8a385f -Merge: 48235a7 63f9cf3 -Author: Marcin Słowiak -Date: Sun Feb 21 19:39:45 2021 +0100 - - Merge pull request #245 from jmprathab/feature/apiExplorationDocumentation - - Add information about swagger and postman API usage - -commit 63f9cf3d1eede813176c1a2eb7685c11afcb2271 -Author: Marcin Słowiak -Date: Sun Feb 21 19:39:20 2021 +0100 - - Add information about swagger and postman API usage - -commit bb449ef3b59d86fd91ac1241626be44667e216f9 -Author: Marcin Słowiak -Date: Sun Feb 21 19:34:14 2021 +0100 - - Issue #234: Add Authorization header to OpenApi specs - -commit 48235a774d4b096b4fc4e4f35cd05face179086b -Merge: c60b96c 2afceac -Author: Marcin Słowiak -Date: Sat Feb 20 22:35:44 2021 +0100 - - Merge pull request #210 from edwardUL99/bugfix/issue-206-PaymentController-Null-Exception - -commit 2afceac79a370ab2ebad84a5ac6e5af58fa676f0 -Author: Edward Lynch-Milner -Date: Sat Feb 20 20:58:56 2021 +0000 - - Issue #206 : Resolved pull request changes - -commit c60b96c99ad41e0280b5941b31a1f1d32985218e -Merge: 353afa9 d938d98 -Author: Marcin Słowiak -Date: Fri Feb 19 22:42:33 2021 +0100 - - Merge pull request #236 from Tobi406/fix-235/500-thrown-when-requesting-payments - - Change access level of properties in PageInfo.java. - -commit d938d980cf577d8adf7408ee6e0bd8690b7dd00c -Author: Marcin Słowiak -Date: Fri Feb 19 22:32:19 2021 +0100 - - Issue #235: Add getters for PageInfo class - -commit 353afa9cd307c5fbb754e22593ba19bbbdda2e71 -Merge: 17584b8 4deb940 -Author: Marcin Słowiak -Date: Fri Feb 19 22:29:15 2021 +0100 - - Merge pull request #242 from jmprathab/feature/239--delete-deprecated-login-filter - - Issue #239: Delete deprecated login filter - -commit 4deb9400ac12590ac7ecfa1d885020b7c26d4d2f -Author: Marcin Słowiak -Date: Fri Feb 19 22:23:13 2021 +0100 - - Issue #239: Delete deprecated login filter - -commit 17584b888cfb1abd44010eaa75397d56c9f3d234 -Merge: be4f803 4528d42 -Author: Marcin Słowiak -Date: Fri Feb 19 22:25:09 2021 +0100 - - Merge pull request #241 from jmprathab/feature/addLocalhostServerAndNewLoginExposure - - Add new login endpoint exposure and localhost server to OpenAPI specs - -commit 4528d42427ac7fb14852d796127e9148c213bce6 -Author: Marcin Słowiak -Date: Fri Feb 19 22:24:48 2021 +0100 - - Add new login endpoint exposure and localhost server to OpenAPI specs - -commit be4f8032bfa6914bc55f5e0e6eb3545c37aac4d7 -Merge: ec4ecb8 ea5bc51 -Author: Marcin Słowiak -Date: Fri Feb 19 22:17:26 2021 +0100 - - Merge pull request #240 from jmprathab/feature/238--addLoginToApiSpecs - - Issue #238: Add auth/login endpoint to api specs - -commit ea5bc51f003a0e15e8246e96abe25cbe5c65e9a6 -Author: Marcin Słowiak -Date: Fri Feb 19 22:06:11 2021 +0100 - - Issue #238: Add auth/login endpoint to api specs - -commit ec4ecb84946f7cf98da3c950e67ce1457feca25d -Merge: a33b954 816eb84 -Author: Marcin Słowiak -Date: Thu Feb 18 20:34:10 2021 +0100 - - Merge pull request #230 from jmprathab/feature/225--enable-useTags-openapi-generator - - Issue #225: Enable useTags for OpenApi specs - -commit 816eb84b012d038589a2aacd13010214ebc18b35 -Author: Marcin Słowiak -Date: Thu Feb 18 18:32:14 2021 +0100 - - Issue #225: Enable useTags for OpenApi specs - -commit a33b9544b77b573aea74916f75e100991022a52e -Merge: 6f2ef4a 1640249 -Author: Marcin Słowiak -Date: Thu Feb 18 18:04:14 2021 +0100 - - Merge pull request #229 from jmprathab/feature/227--fix-typos-in-specs - - Issue #227: Fix typos in specs - -commit 1640249dfd2465a4da0016e41ce88ca0083dd73b -Author: Marcin Słowiak -Date: Thu Feb 18 17:59:48 2021 +0100 - - Issue #227: Use proper object type bigdecimal -> number - -commit 6b3f5660248d1b3417ad8886343d11891024610f -Author: Marcin Słowiak -Date: Thu Feb 18 17:36:55 2021 +0100 - - Issue #227: Fix typos and add uppercase - -commit 6f2ef4a728c13bf5576c2e652aec4b6b764660c6 -Merge: 12eedc6 9bd6ecc -Author: Marcin Słowiak -Date: Thu Feb 18 17:15:25 2021 +0100 - - Merge pull request #223 from jmprathab/feature/issue--222-add-pagination-results-for-payments - - Issue #222: Add pagination results for payments - -commit 9bd6eccdf0421e132374c32331afc99615cfe772 -Author: Marcin Słowiak -Date: Wed Feb 17 22:44:33 2021 +0100 - - Issue #222: Add lombok to api module - -commit 2d968f10eb7f57cf61629bac7b45a5698eee214a -Author: Marcin Słowiak -Date: Wed Feb 17 22:40:11 2021 +0100 - - Issue #222: Add support for paging information in response - -commit 12eedc6ab959f522dfe75440f47c35be246ef63a -Merge: 616e43c 3789605 -Author: Marcin Słowiak -Date: Wed Feb 17 20:39:29 2021 +0100 - - Merge pull request #219 from jmprathab/bugfix/214--replace-old-swaggerdocs - - Issue #214: Replace old swaggerdocs with new approach - -commit 3789605ca439e1191dedeb75082b4dad5632d73e -Author: Marcin Słowiak -Date: Tue Feb 16 22:31:51 2021 +0100 - - Issue #214: Update docs - -commit 35de6cec51719a4e6dbc69d078f4e9c458bfaf8b -Author: Marcin Słowiak -Date: Tue Feb 16 22:29:09 2021 +0100 - - Issue #214: Remove old swagger docs and replace with new one - -commit 616e43c79f930f5e5ba65fc16721d5265dee217e -Merge: 5f4501d 7f53031 -Author: Marcin Słowiak -Date: Tue Feb 16 21:55:38 2021 +0100 - - Merge pull request #218 from jmprathab/feature/disable-smtp-healthcheck - - Disable SMTP healthcheck - -commit 7f53031bc07dddd0559c8207103a3009748186f4 -Author: Marcin Słowiak -Date: Tue Feb 16 21:54:08 2021 +0100 - - Disable SMTP healthcheck - -commit 5f4501d4a97f9b48095f5433a56dceb7f6749b5c -Merge: 610a129 a4511b1 -Author: Prathab -Date: Wed Feb 10 18:59:11 2021 +0530 - - Merge pull request #215 from DDmit04/feature/221--Email-confirm-functionality - - Issue #211: email confirm functionality - -commit a4511b1324d9fb59c332a6c58dee4976f28f3482 -Author: Дмитроченков Даниил Андреевич -Date: Wed Jan 6 02:35:18 2021 +0300 - - Issue #211 fix tests - -commit d3f4f1dcc5022a127bfa23c9a29d07cad7afac69 -Author: Дмитроченков Даниил Андреевич -Date: Wed Jan 6 02:30:27 2021 +0300 - - Issue #211 fix - -commit f003bdd7cc2b925e33205ee5c00612ca81110938 -Author: Дмитроченков Даниил Андреевич -Date: Wed Jan 6 02:28:20 2021 +0300 - - Issue #211 update UserSDJpaService tests - -commit c88372795fb188a0dfde1bbd0086852204b51240 -Author: Дмитроченков Даниил Андреевич -Date: Wed Jan 6 02:27:11 2021 +0300 - - Issue #211 fix and add SecurityToken tests - -commit de52ac02f029caecc3f905dd05b7256339097761 -Author: Дмитроченков Даниил Андреевич -Date: Wed Jan 6 01:40:35 2021 +0300 - - Issue #211 update data.sql - -commit 2a91f6445c1684f12ed14555ae566d2d595a8ca4 -Author: Дмитроченков Даниил Андреевич -Date: Wed Jan 6 01:39:54 2021 +0300 - - Issue #211 add email confirm mappings - -commit 78b0d835c7cd3bf2565fd7a2f7a6859dc65b619e -Author: Дмитроченков Даниил Андреевич -Date: Wed Jan 6 01:37:14 2021 +0300 - - Issue #211 update UserService - -commit 237ec59c8368990705179d3dcdc16c0214c9ae7b -Author: Дмитроченков Даниил Андреевич -Date: Wed Jan 6 01:30:21 2021 +0300 - - Issue #211 update SecurityToken and SecurityTokenService - -commit bf9eed43defec5ca37fae6c004ffc6a79096fd25 -Author: Дмитроченков Даниил Андреевич -Date: Wed Jan 6 01:26:36 2021 +0300 - - Issue #211 add `emailConfirmed` field to User - -commit 799ddd7908a212e45bdbaddf67a2fad7f57e696a -Author: Edward Lynch-Milner <18222021@studentmail.ul.ie> -Date: Tue Dec 8 20:53:49 2020 +0000 - - Added AfterMapping which maps user details in enriched request to UserDto and member details to HouseMemberDto to resolve the null exceptions. Made Payment#description non-unique - -commit 610a1298c63df85d56c8b654e4f30c636c1d98c6 -Merge: 94d28e8 91ff17c -Author: Prathab -Date: Thu Nov 19 13:38:56 2020 +0530 - - Merge pull request #209 from DDmit04/feature/208--MailService-bugfixes - - Issue#208 mail service bugfixes - -commit 91ff17c5d35f69699fd0f32a3bff3203693bae0a -Author: Дмитроченков Даниил Андреевич -Date: Thu Nov 12 16:39:59 2020 +0300 - - Issue #208 fix data sql - -commit 7680b57164e59a45dc1d057e3661de4a0e22e420 -Author: Дмитроченков Даниил Андреевич -Date: Thu Nov 12 16:39:28 2020 +0300 - - Issue #208 fix postman config - -commit 94d28e8f1792a74080c95dfc043f5db7f49b6f41 -Merge: fc41037 f873035 -Author: Marcin Słowiak -Date: Sat Nov 7 14:11:51 2020 +0100 - - Merge pull request #194 from DDmit04/feature/151--Forgot-Password-functionality - - Feature #151 Implement Forgot Password functionality - -commit f873035d197341dfb5ac16be5b69feb780fe6e81 -Author: Дмитроченков Даниил Андреевич -Date: Fri Nov 6 11:07:58 2020 +0300 - - Issue #151 fix build - -commit 58ff8ff5dfe3475a540a93ee5ffb56303f9ee877 -Merge: d6334d5 fc41037 -Author: DDmit04 <46588421+DDmit04@users.noreply.github.com> -Date: Fri Nov 6 10:29:37 2020 +0300 - - Merge branch 'master' into feature/151--Forgot-Password-functionality - -commit fc410376bf2cb568e579a5ad71517d7e77a21a04 -Merge: a24da1c e3f882f -Author: Prathab -Date: Thu Nov 5 19:55:38 2020 +0530 - - Merge pull request #195 from SergeyHydra/feature/issue-176--migration-amenityController-openApi - - Issue #176: Migration of AmenityController to OpenApi yaml schema - -commit d6334d5fa0fbaf9883c94545e33b2be74cd23770 -Author: Дмитроченков Даниил Андреевич -Date: Wed Nov 4 11:54:28 2020 +0300 - - Issue #151 update tests - -commit e64fb75f824a7dc6264a568740009dcdbc37e1bc -Author: Дмитроченков Даниил Андреевич -Date: Wed Nov 4 01:52:03 2020 +0300 - - Issue #151 add MailService tests - -commit 886ffa48d76c37b3390dee4dea25f4c9a982716f -Author: Дмитроченков Даниил Андреевич -Date: Wed Nov 4 01:27:07 2020 +0300 - - Issue #151 fix tests - -commit c7b3bdc319c31ba70ba27ed61744fdf4574c710c -Author: Дмитроченков Даниил Андреевич -Date: Wed Nov 4 01:26:49 2020 +0300 - - Issue #151 make MailService methods return boolean - -commit a1ae6faf377816d2486a57f54826e4a77859376f -Author: Дмитроченков Даниил Андреевич -Date: Wed Nov 4 00:37:54 2020 +0300 - - Issue #151 extract mail texts to final vars - -commit 307606e82e2b9fa6c621a9b23ca1ef539cca776c -Author: Дмитроченков Даниил Андреевич -Date: Wed Nov 4 00:32:11 2020 +0300 - - Issue #151 clean up - -commit e3f882fd8cffcc7bfaeac6dc8c35a9175aa7878a -Author: Сердюк Сергей Владимирович -Date: Sun Nov 1 21:04:14 2020 +0300 - - Issue #176: fixing build - -commit ef84668080433bdb89f2d21c1e519a0fad63df28 -Author: Сердюк Сергей Владимирович -Date: Thu Oct 15 21:25:12 2020 +0300 - - Issue #176: fixing pr comments - -commit 6fc31c41d82a82c19479ee150232fdf941201918 -Author: Сердюк Сергей Владимирович -Date: Wed Oct 14 00:37:59 2020 +0300 - - Issue #176: delete unused type mapping - -commit d20adbf4897a6ae68c9587147ad1a945c65a3233 -Author: Сердюк Сергей Владимирович -Date: Wed Oct 14 00:16:09 2020 +0300 - - Issue #176: migrated AmenityController to open api spec - -commit 6fbc7950a9a89bcbc94c8e493df9a0a0b10c222d -Author: Сердюк Сергей Владимирович -Date: Mon Oct 12 23:49:42 2020 +0300 - - Issue #176: init commit - -commit 09699b7449a393f961f2b96534d3f84c70148b75 -Author: Дмитроченков Даниил Андреевич -Date: Sat Oct 31 01:00:16 2020 +0300 - - Issue #151 fix build - -commit ee820c4796a97c88d84f95aff9b9b4be84063db8 -Merge: 50c0ae5 a24da1c -Author: DDmit04 <46588421+DDmit04@users.noreply.github.com> -Date: Sat Oct 31 00:16:11 2020 +0300 - - Merge branch 'master' into feature/151--Forgot-Password-functionality - -commit a24da1c36311fbb62248c76465949865d3e3f688 -Merge: be83a0f d0f6132 -Author: Marcin Słowiak -Date: Fri Oct 30 15:06:11 2020 +0100 - - Merge pull request #203 from rmgrimm/feature/issue-183--integration-tests - - Issue #183: Setup integration-tests module - -commit d0f613293e4ec217b1fcbdb869b9a16b061d0e6b -Author: Robert Grimm -Date: Fri Oct 30 08:43:31 2020 -0500 - - Issue #183: Switch to TestRestTemplate instead of RestAssured - -commit 489f89278bb9e4b450b4e38ec6bdf613ccd80fc9 -Author: Robert Grimm -Date: Fri Oct 30 02:43:54 2020 -0500 - - Issue #183: Configure integration-tests module; Add sample integration test - -commit be83a0f1ff15848eb71e33a9066790cd54471287 -Merge: 8795e75 7b2b34e -Author: Marcin Słowiak -Date: Sat Oct 24 10:51:12 2020 +0200 - - Merge pull request #200 from rmgrimm/feature/issue-159--list-housemates - - Issue #159: Endpoint to get all members of all houses a user is in - -commit 8795e75328034e22cff42c99c5bf1a4949b2628c -Merge: cdeefa5 d594fc2 -Author: Marcin Słowiak -Date: Sat Oct 24 10:38:29 2020 +0200 - - Merge pull request #191 from edwin9870/feature/172--migration-of-paymentController-to-openApi-yaml-schema - - Issue #172: Migration of PaymentController to OpenApi yaml schema - -commit d594fc2941c46af4ed7cdb76a279c212c5612865 -Author: Edwin Ramirez Ventura -Date: Fri Oct 23 23:39:07 2020 -0400 - - Issue #172: Move PaymentController.listAllMemberPayments to HouseMemberDocumentController and PaymentController.listAllAdminScheduledPayments to CommunityController. - - This refactor includes move test to respective classes. - -commit 9804cb5534c1ad948392118bb30d78a021bd5c1e -Merge: aeb9941 cdeefa5 -Author: Edwin Ramirez Ventura -Date: Fri Oct 23 23:29:41 2020 -0400 - - Issue #172: Merge upstream master changes - -commit 7b2b34ea0532609461928f32f71537af53fe6151 -Author: Robert Grimm -Date: Thu Oct 22 01:41:46 2020 -0500 - - Issue #159: Add endpoint for listing members of all houses for a user - -commit cdeefa5ea10c3f1dc86839834e788b14a21a7aa6 -Merge: 7f03188 6cb5802 -Author: Marcin Słowiak -Date: Mon Oct 19 08:50:08 2020 +0200 - - Merge pull request #198 from edwin9870/feature/issue-174--migration-of-housecontroller-to-openapi-yaml-schema - - Issue #174: Migration of HouseController to OpenApi yaml schema - -commit 6cb5802c433aa32f9011a2e32a383a052758e347 -Author: Edwin Ramirez Ventura -Date: Sun Oct 18 19:43:24 2020 -0400 - - Issue #174: Remove 404 responseCode in api.yaml at for get /houses - -commit d5101921ab7d530f67acff2482f3dc7acdd23bf1 -Author: Edwin Ramirez Ventura -Date: Sun Oct 18 19:39:12 2020 -0400 - - Issue #174: Format HouseControllerTest to make it more readable - -commit 50c0ae5f5b70471810e082efc0956b1b867ad423 -Merge: f65957d 7f03188 -Author: DDmit04 <46588421+DDmit04@users.noreply.github.com> -Date: Sun Oct 18 22:11:37 2020 +0300 - - Merge branch 'master' into feature/151--Forgot-Password-functionality - -commit f65957df1c37b25f075a1d16970282ca77c53fcd -Author: Дмитроченков Даниил Андреевич -Date: Sun Oct 18 22:08:49 2020 +0300 - - Issue #151 clean up - -commit dbd71bf5b29f24ac7a6cf6ad5645762c39a438a1 -Author: Edwin Ramirez Ventura -Date: Sat Oct 17 21:33:03 2020 -0400 - - Issue #174: Remove not used import - -commit ce24a4907e4f2e79395f7a6695fb13ed492d0a21 -Author: Edwin Ramirez Ventura -Date: Sat Oct 17 21:23:28 2020 -0400 - - Issue #174: Remove ID parameter required from HouseMemberDTO - -commit a09955e54aa5292af2ada79fdabd40490b172024 -Author: Edwin Ramirez Ventura -Date: Sat Oct 17 21:12:27 2020 -0400 - - Issue #174: Migrate HouseController.deleteHouseMember to OpenApi - -commit 81b41ab795e2d6bda85e8aab9de53c6feb05f378 -Author: Edwin Ramirez Ventura -Date: Sat Oct 17 20:46:34 2020 -0400 - - Issue #174: Rename HouseMemberMapper.newHouseMemberSetToHouseMemberSet to HouseMemberMapper.houseMemberDtoSetToHouseMemberSet - -commit d40bb91ef5d9a073e307641ad617409d4301c655 -Author: Edwin Ramirez Ventura -Date: Sat Oct 17 20:24:02 2020 -0400 - - Issue #174: Migrate HouseController.listAllMembersOfHouse and HouseController.addHouseMembers to OpenAPI yaml - -commit 2c19a9f4353fc69a14a308bf100a63f217c57394 -Author: Edwin Ramirez Ventura -Date: Sat Oct 17 19:28:37 2020 -0400 - - Issue #174: Migrate HouseController.listAllHouses and HouseController.getHouseDetails to OpenAPI yaml - -commit 3c5bf885d19933a5f5e4ff64bd1ae4cafd70fd4c -Author: Дмитроченков Даниил Андреевич -Date: Sat Oct 17 22:34:08 2020 +0300 - - Issue #151 fix build - -commit 6b752271b332c3777974913a38f1919daf98dc59 -Author: Дмитроченков Даниил Андреевич -Date: Sat Oct 17 19:03:23 2020 +0300 - - Issue #151 fix UserSDJpaServiceTest - -commit 9feb7c0da8a39ef28341a3e17fbfd45ad3b0af27 -Author: Дмитроченков Даниил Андреевич -Date: Sat Oct 17 19:02:58 2020 +0300 - - Issue #151 fix SecurityTokenSDJpaServiceTest - -commit 9463092724d709e874046e3896b500f600c64bfe -Author: Дмитроченков Даниил Андреевич -Date: Sat Oct 17 19:02:28 2020 +0300 - - Issue #151 fix UserControllerTest - -commit 058e5fb1350b044069244c0725db7dcb96e8aa28 -Author: Дмитроченков Даниил Андреевич -Date: Sat Oct 17 18:55:47 2020 +0300 - - Issue #151 add dev version of MailSDJpaService - -commit 937f6a528beb55299376cd31b925f3ede98f41c2 -Author: Дмитроченков Даниил Андреевич -Date: Sat Oct 17 18:54:34 2020 +0300 - - Issue #151 turn SecurityToken - User relationsips to ManyToOne - -commit e5ab9bdc4c705b48b0b74ae193fe532d9c548c9b -Author: Дмитроченков Даниил Андреевич -Date: Fri Oct 16 10:36:12 2020 +0300 - - Issue #151 migrate new endpoint to 'api.yaml' - -commit 4f2c9876f54a3196a64ffb7392b2988de5b00a1e -Author: Дмитроченков Даниил Андреевич -Date: Fri Oct 16 10:35:29 2020 +0300 - - Issue #151 add 'isUsed' prop to SecurityToken - -commit 1bab0537a1ff331bf3d8a1c7caf100c3e88340e1 -Author: Дмитроченков Даниил Андреевич -Date: Fri Oct 16 10:30:34 2020 +0300 - - Issue #151 turn token Dates to LocalTimes - -commit 516e65510a04dfcd68d964bd2e890bbe3c3d95ac -Author: Дмитроченков Даниил Андреевич -Date: Fri Oct 16 10:26:08 2020 +0300 - - Issue #151 configure SMTP with enviroment varibles - -commit 2444fcb90d808ef06247beb3217256fa1207a841 -Author: Дмитроченков Даниил Андреевич -Date: Fri Oct 16 10:24:42 2020 +0300 - - Issue #151 fix gradle dependency - -commit 7f03188962cf98ed84cf8d1eb4a01af54412f3e3 -Merge: 13e1bea 7b5a485 -Author: Prathab -Date: Thu Oct 15 18:07:33 2020 +0530 - - Merge pull request #197 from tomsajuk/feature/issue-116--DeleteAmenityBooking - - Issue #116: Add Endpoint for Delete Amenity Booking - -commit 7b5a485f6aeda7a223d917cb657f76f5a0fc43f8 -Author: tomsajuk -Date: Thu Oct 15 08:35:46 2020 +0530 - - Issue #116: Add Endpoint for Delete Amenity Booking - -commit a51e01b891e15feb88c848a129e832a519e91c59 -Author: Дмитроченков Даниил Андреевич -Date: Wed Oct 14 14:55:12 2020 +0300 - - Issue #151 rename MyHomeTokenType by SecurityTokenType - -commit 25f2961a00515b0d7f6a6b79505c48850c72b1b0 -Author: Дмитроченков Даниил Андреевич -Date: Wed Oct 14 00:34:16 2020 +0300 - - Issue #151 change hibernate SecurityToken.tokenType enum type - -commit a4c90c2523e30870b9a45429a14c1a112313924b -Author: Дмитроченков Даниил Андреевич -Date: Wed Oct 14 00:17:36 2020 +0300 - - Issue #151 clean up - -commit df5a9a93da49032dd2999baa616be49607f9bf7e -Author: Дмитроченков Даниил Андреевич -Date: Wed Oct 14 00:13:28 2020 +0300 - - Issue #151 try fix - -commit 63498542db0ea577ca11bcc5c5803ce34650e407 -Author: Дмитроченков Даниил Андреевич -Date: Tue Oct 13 23:43:13 2020 +0300 - - Issue #151 Add new UserController tests - -commit 2ef6d0eab2192ddb60bd3d641479869c845ddbc8 -Author: Дмитроченков Даниил Андреевич -Date: Tue Oct 13 23:42:50 2020 +0300 - - Issue #151 Add new UserService tests - -commit 06785faffa00ad5a92dfa38dc29dd239fc44c19b -Author: Дмитроченков Даниил Андреевич -Date: Tue Oct 13 23:35:09 2020 +0300 - - Issue #151 fix User service - -commit f25df255d3a12cc327fe88c33f1c02ddf451a840 -Author: Дмитроченков Даниил Андреевич -Date: Tue Oct 13 23:34:32 2020 +0300 - - Issue #151 fix tests with new User entity constructor - -commit 571a0f0ddd158727cdfa632407003c32ad30f201 -Author: Дмитроченков Даниил Андреевич -Date: Tue Oct 13 18:17:12 2020 +0300 - - Issue #151 Crete tests for SecurityTokenService - -commit 75e219dc480c974dc8ab7c8a839e197c194d6eed -Author: Дмитроченков Даниил Андреевич -Date: Tue Oct 13 12:33:10 2020 +0300 - - Issue #151 update postman configuration with new endpoint - -commit a35a0014882c7d31902ef04d413038df4ed1e40f -Author: Дмитроченков Даниил Андреевич -Date: Tue Oct 13 12:32:36 2020 +0300 - - Issue #151 update UserController with forgot password functionality - -commit 8b77473a127c5aebd4343aeae787ff36cd1b1e2c -Author: Дмитроченков Даниил Андреевич -Date: Tue Oct 13 12:31:50 2020 +0300 - - Issue #151 update UserService with forgot password functionality - -commit a489d3478cafc7726c85c015812b0743d05a596b -Author: Дмитроченков Даниил Андреевич -Date: Tue Oct 13 12:30:26 2020 +0300 - - Issue #151 Add SecurityTokenService - -commit 1a5ba624ab44ff7d982da187794ce7d8c468c696 -Author: Дмитроченков Даниил Андреевич -Date: Tue Oct 13 12:29:27 2020 +0300 - - Issue #151 Add MailService - -commit 7d6f36c148c2be024b423f0fe6a14542a4d82235 -Author: Дмитроченков Даниил Андреевич -Date: Tue Oct 13 12:28:20 2020 +0300 - - Issue #151 Add SecurityToken to data.sql - -commit e003ac12a3ff9980539c9f93933187b155b22708 -Author: Дмитроченков Даниил Андреевич -Date: Tue Oct 13 12:25:21 2020 +0300 - - Issue #151 Add SecurityToken entity - -commit 13e1beac2c036c6b402d73fd00393a1659407d71 -Merge: d2296b5 e446e0e -Author: Marcin Słowiak -Date: Tue Oct 13 17:58:59 2020 +0200 - - Merge pull request #193 from huyle1097/bugfix/issue-192--remove-unused-payment-service-method - - Issue #192: remove unused methods in PaymentService - -commit aeb99416b8d5a9f187026429376f1cb4b79ea26b -Author: Edwin Ramirez Ventura -Date: Tue Oct 13 09:45:54 2020 -0400 - - Issue #172: Add booleanGetterPrefix is and refactor the code affected by this - -commit e446e0eea732b3239022ac5703462c8bd095c6d0 -Author: huyle1097 -Date: Tue Oct 13 20:36:37 2020 +0700 - - Issue #192: remove unused methods in PaymentService - -commit 92513d4ca411bf95b562600e191a028ef8fb4d61 -Author: Edwin Ramirez Ventura -Date: Tue Oct 13 08:59:12 2020 -0400 - - Issue #172: Fix Communities's tag typo in apy.yaml - -commit d2296b5446c7535f7d19d15b87df5987642e2180 -Merge: 50f0213 46432fa -Author: Marcin Słowiak -Date: Tue Oct 13 12:44:56 2020 +0200 - - Merge pull request #190 from huyle1097/feature/issue-175--community-controller-openapi-migration - - Issue #175: Migration of CommunityController to OpenApi yaml schema - -commit 46432fa89b6deba57c7f480117f302b5a3d8267d -Author: huyle1097 -Date: Tue Oct 13 16:22:05 2020 +0700 - - Issue #175: format code - -commit 64e5e12155ae92a29049e895d0cac35cc14f3503 -Author: huyle1097 -Date: Tue Oct 13 07:25:55 2020 +0700 - - Issue #175: remove unused dto and fix test - -commit bf6907cf7f322f892b2dba79cd2b0d2cafcd3239 -Author: huyle1097 -Date: Tue Oct 13 07:21:42 2020 +0700 - - Issue #175: Convert /communities/{communityId}/houses/{houseId} to OpenApi yaml specification - -commit 0d7fcfbcd0a67abeedd6af1a3663af7fef3e0e5c -Author: huyle1097 -Date: Tue Oct 13 07:18:54 2020 +0700 - - Issue #175: Convert /communities/{communityId}/houses to OpenApi yaml specification - -commit 318899be0e52a96fa2b4bbd5356f9ba5bafff8aa -Author: huyle1097 -Date: Tue Oct 13 07:11:48 2020 +0700 - - Issue #175: Convert /communities/{communityId}/admins/{adminId} to OpenApi yaml specification - -commit 21b80eded80e31f34b04db79de33dd6845c7b300 -Author: huyle1097 -Date: Tue Oct 13 07:09:31 2020 +0700 - - Issue #175: Convert /communities/{communityId}/admins to OpenApi yaml specification - -commit 621df5f8f62731c03541c6eeaebb711884d2977a -Author: huyle1097 -Date: Tue Oct 13 07:03:53 2020 +0700 - - Issue #175: Convert /communities/{communityId} to OpenApi yaml specification - -commit a2adcd828ce770a86cca008d4b763c44688dae85 -Author: huyle1097 -Date: Tue Oct 13 06:49:25 2020 +0700 - - Issue #175: Convert /communities to OpenApi yaml specification - -commit 50f0213b6c1e2690019b64ab627daad3da4726dd -Author: Marcin Słowiak -Date: Tue Oct 13 11:48:47 2020 +0200 - - Fix WebSecurity after merging PR - -commit a2f48827b0d25e2be7c8a75782631fa4cda16a4b -Author: Thomas Windt -Date: Mon Oct 12 14:59:10 2020 +0200 - - Issue #150: Add Admin Filter - - Signed-off-by: Thomas Windt - (cherry picked from commit 00c4b5f65e8d415f39b56b6bbf5dd7b72c2c6c2d) - -commit 81a28e25988a76b72ed1dd39847badaacee7d345 -Author: Edwin Ramirez Ventura -Date: Mon Oct 12 21:07:03 2020 -0400 - - Migrate PaymentController.listAllAdminScheduledPayments to OpenApi - -commit 43656a4603bd28a53bdb70dc024fe3abaf69bcb1 -Author: Edwin Ramirez Ventura -Date: Mon Oct 12 20:56:26 2020 -0400 - - Migrate PaymentController.listAllMemberPayments to OpenApi - -commit 7ae277df44572bfb6a00099ba7ace67ec41059d8 -Author: Edwin Ramirez Ventura -Date: Mon Oct 12 20:13:14 2020 -0400 - - Migrate PaymentController.listPaymentDetails to OpenApi - -commit a4a9e0407f1cf7ba8a2830b50521bdffb79117f0 -Merge: 2daa3db 085cc4e -Author: Marcin Słowiak -Date: Mon Oct 12 19:43:22 2020 +0200 - - Merge pull request #165 from fx0000/feature/#125--amenity_creation_access - - Issue #152: Add authorization filter for community - -commit 085cc4e15184713682e203f2a55b192d4d20238b -Author: myself -Date: Mon Oct 12 19:44:02 2020 +0200 - - Issue #152: apply code style for filter class - -commit 52d9c9a9c0836886bb88abf550c5e03aab159b2b -Author: myself -Date: Mon Oct 12 12:38:00 2020 +0200 - - Issue #152: apply code style - -commit 083e14b38ad41764e4fde4168aa0c4d1d1b6a69f -Author: myself -Date: Fri Oct 9 22:05:40 2020 +0200 - - Issue #152: remove tests - -commit 1e80c7ea34da439d3881d35b59693778dd565eef -Author: myself -Date: Sat Oct 10 13:44:53 2020 +0200 - - Issue #152: review changes - -commit 16505c447bfc031ca0c24512e5c285fe1c431958 -Author: myself -Date: Fri Oct 9 22:05:40 2020 +0200 - - Issue #152: code styles, code review edits - -commit 4d87f21edfc1a35b19960761c6e9d63bdda1510c -Author: myself -Date: Fri Oct 9 18:35:12 2020 +0200 - - Issue #152: modify tests, remove test profile, fix build - -commit 7d5c9d42bb8b382b8b88d5ae0a8c1efa8215588d -Author: myself -Date: Fri Oct 9 16:18:25 2020 +0200 - - Issue #152: Add tests - -commit a83b6826ad835f8de000c26b4616f194ef44a4bf -Author: myself -Date: Thu Oct 8 17:24:03 2020 +0200 - - Issue #152: Add authorization filter for community - -commit 2daa3dbb31ac73b184269432381d86dd4680649b -Merge: 7bad375 afe0212 -Author: Marcin Słowiak -Date: Mon Oct 12 12:29:37 2020 +0200 - - Merge pull request #188 from huyle1097/feature/issue-173--house-member-document-controller-openapi-migration - - Issue #173: Migration of HouseMemberDocumentController to OpenApi yaml schema - -commit afe021238541d13b4e8d8a98f1f3f8d5b7a150aa -Author: huyle1097 -Date: Mon Oct 12 07:58:10 2020 +0700 - - Issue #173: Change tag name, fix typo - -commit e66da6d22a96c47d39bfc4a8c4d3b6a8f7bab10e -Author: huyle1097 -Date: Sun Oct 11 22:25:38 2020 +0700 - - Issue #173: Convert /members/{memberId}/documents to OpenApi yaml specification - -commit 7bad375b5599487e343d7c19f6001b9a17d6c792 -Merge: 80029a2 4319843 -Author: Marcin Słowiak -Date: Sun Oct 11 19:32:38 2020 +0200 - - Merge pull request #167 from DDmit04/feature/157--Repeating-helper-methods-in-tests - - Issue #157: Repeating helper methods in tests - -commit 80029a28eaeb75a7efa7a9c4a40b64df8a7b73ea -Merge: 202f2c0 61eca83 -Author: Marcin Słowiak -Date: Sun Oct 11 19:12:29 2020 +0200 - - Merge pull request #189 from jmprathab/feature/adjust-contribution-guide - - Add info about commit names, features vs defects, rebase over merge - -commit 61eca8351041470f938abdea9ae8f1cc5725044d -Author: Marcin Słowiak -Date: Sun Oct 11 19:11:56 2020 +0200 - - Add info about commit names, features vs defects, rebase over merge - -commit 431984384f27afbcd30f05c76be4600d2b8b933e -Author: Дмитроченков Даниил Андреевич -Date: Thu Oct 8 23:38:38 2020 +0300 - - issue #157 apply new help class to test classes - -commit eb4ea164524696aa064e19a63ef32b89a8347b6d -Author: Дмитроченков Даниил Андреевич -Date: Thu Oct 8 23:37:46 2020 +0300 - - issue #157 remove help methods from test classes - -commit e99347925d0fb8d2a2aa005ac7e2a46df71f225e -Author: Дмитроченков Даниил Андреевич -Date: Thu Oct 8 23:34:32 2020 +0300 - - issue #157 add test helper class - -commit cd4efb9075de4a310fce790c4e75b247ffa58523 -Author: Edwin Ramirez Ventura -Date: Sat Oct 10 23:52:42 2020 -0400 - - Migrate PaymentController.schedulePayment to OpenApi - -commit 202f2c05c0495bd1ae7ed11cb037d745a3514387 -Merge: 2f47757 b94ad05 -Author: Marcin Słowiak -Date: Sat Oct 10 19:33:48 2020 +0200 - - Merge pull request #185 from P3trur0/feature/160--add-spring-actuator - - Issue #160: Replace HealthCheckController with Spring Actuator - -commit b94ad05debdcf1603d3be791037de30df271471d -Author: upescatore -Date: Thu Oct 8 20:34:34 2020 +0200 - - Issue #160: Add Spring Boot Actuator endpoints - -commit 2f47757ae00947538a71f10ca6caa9e3b02b0cb8 -Merge: ae4b521 0486a56 -Author: Marcin Słowiak -Date: Sat Oct 10 18:16:29 2020 +0200 - - Merge pull request #184 from jmprathab/feature/issue-182--remove-integration-tests - - Issue #182: Remove integration tests - -commit ae4b521865b85c5ed7a12a15c531cada33feb68c -Merge: d59859c 609ba5c -Author: Marcin Słowiak -Date: Sat Oct 10 18:15:59 2020 +0200 - - Merge pull request #171 from jmprathab/feature/issue-170--users-controller-openapi-migration - - Issue #170: Users controller OpenApi migration - -commit 0486a56abfca9671b566061450e2ed33c922b8d1 -Author: Marcin Słowiak -Date: Sat Oct 10 18:13:15 2020 +0200 - - Issue #182: Fix package location for controllers unit tests - -commit 9124a8068614958a0177cf1178d865ff721e0abd -Author: Marcin Słowiak -Date: Sat Oct 10 18:12:32 2020 +0200 - - Issue #182: Remove integration tests - -commit 609ba5ce30d434852c357a643a89d3f4a9fda7ce -Author: Marcin Słowiak -Date: Sat Oct 10 18:11:11 2020 +0200 - - Issue #170: Add default server as localhost - -commit d59859c2927d7875f6704ad078f27b00de917772 -Author: Marcin Słowiak -Date: Sat Oct 10 11:08:08 2020 +0200 - - Update CONTRIBUTING.md - -commit 1e841b967bdb51abea5fe58870c472249db3ad6e -Merge: 6a6b1b7 7f79866 -Author: Marcin Słowiak -Date: Sat Oct 10 10:32:00 2020 +0200 - - Merge pull request #177 from HemantJoshi11/168--code_style - - Issue #168: Add info about code style to CONTRIBUTING.md - -commit 7f798669240e5389d7b4d4a9bfe173b8bf35cf99 -Author: Hemant Joshi <33864446+HemantJoshi11@users.noreply.github.com> -Date: Sat Oct 10 13:59:08 2020 +0530 - - Update CONTRIBUTING.md - -commit c8c9249badd223df66a95dd6ee60fc2185662c5f -Author: Edwin Ramirez Ventura -Date: Fri Oct 9 19:34:53 2020 -0400 - - Add /payments post path to api.yaml - -commit 16f4cc53424b75e8858b6a8e768d0157d7c4e617 -Author: Marcin Słowiak -Date: Fri Oct 9 21:43:20 2020 +0200 - - Issue #170: Add name variable as required in CreateUserRequest - -commit b292c03615a96258e821e78cbdac27aa013f2c5f -Author: Marcin Słowiak -Date: Fri Oct 9 21:41:54 2020 +0200 - - Issue #170: Remove unused models that were replaced by generated code - -commit ce36e83363a8583444ebca6aeac1333731262101 -Author: Hemant Joshi -Date: Sat Oct 10 00:56:52 2020 +0530 - - Issue 168: Add info about code style to CONTRIBUTING.md - -commit 749e108b6194272b75b48295b066b90145f63ad3 -Author: Marcin Słowiak -Date: Fri Oct 9 21:26:18 2020 +0200 - - Issue #170: Fix unit tests for UsersController - -commit f934d53af73def51c92a9e830ebcc0a6720c36bb -Author: Marcin Słowiak -Date: Fri Oct 9 21:07:21 2020 +0200 - - Issue #170: Convert GET /users/{userId} to yaml specification - -commit 7c28816069cedd2b4b824d7730c572b7bc9e70bd -Author: Marcin Słowiak -Date: Fri Oct 9 20:58:46 2020 +0200 - - Issue #170: Add GET /users with Spring Pageable as a custom solution - -commit 29c7d9bb4feaebceb3fe03e1c76bdcae45f3cbf2 -Author: Marcin Słowiak -Date: Fri Oct 9 20:19:57 2020 +0200 - - Issue #170: Do not create default method implementation in generated interfaces - -commit 4ebba85c9c18f72a42847b6214fe742c34cd2a48 -Author: Marcin Słowiak -Date: Fri Oct 9 20:16:21 2020 +0200 - - Issue #170: Bump OpenApi version to 5.0.0-beta2 to have Set collections - -commit cf65150f9931b26e40cffed490fb231cfa0f43d3 -Author: Marcin Słowiak -Date: Fri Oct 9 19:48:26 2020 +0200 - - Issue #170: Convert POST /users endpoint to OpenApi yaml schema - -commit 9b5808bdda89d28e92085f0449768628af2da2e2 -Author: Marcin Słowiak -Date: Wed Oct 7 19:40:51 2020 +0200 - - Issue #170: Add interface only option to generator config - -commit 6a6b1b7b00558e5aab35f8ffd54295a24411ccb7 -Merge: d9baa06 65e3967 -Author: Prathab -Date: Thu Oct 8 11:00:57 2020 +0530 - - Merge pull request #163 from jufab/feature/158--DataLoader-class-does-nothing - - Issue #158: DataLoader class does nothing - -commit 65e3967b636ca3db27ebdaf37c2dfdf3c8a0546e -Author: Julien FABRE -Date: Wed Oct 7 21:27:48 2020 +0200 - - Issue #158: DataLoader class does nothing - -commit d9baa0625bda08953d193fcbb0f40331265d37c3 -Author: Prathab Murugan -Date: Wed Oct 7 21:50:48 2020 +0530 - - Add Social Login to FEATURES.md - -commit 24c484c8450c5b3d5a3c8b2aabfb9ddcf722942a -Merge: da04d54 099f02f -Author: Marcin Słowiak -Date: Mon Oct 5 12:38:01 2020 +0200 - - Merge pull request #154 from tomsajuk/master - - Issue #149 : Add current user as Admin when creating a community - -commit 099f02f8c3c74e2d119905c449aa30e05e07e808 -Author: tomsajuk -Date: Mon Oct 5 08:40:25 2020 +0530 - - Issue #149: Add current user as Admin when creating a community - -commit da04d543e7f9ec1f907ce5ca4c07fb652f543dbc -Author: Prathab Murugan -Date: Sun Oct 4 12:49:55 2020 +0530 - - Update Copyright and Features doc - - * Marked completed features in FEATURES.md - * Update copyright for all files - -commit 228b7a39e61bafa58e3814388e6ce3f732f8ea38 -Author: Prathab Murugan -Date: Sun Oct 4 11:37:01 2020 +0530 - - Code formatting - - Formatting codebase with style guide from Square - -commit 5914e6179540c6db93b2df437bda17eb5971feb1 -Merge: 3e1a3b9 0b3497b -Author: Prathab -Date: Sat Oct 3 10:14:05 2020 +0530 - - Merge pull request #148 from jmprathab/feature/issue-147--openapi-specs-generation - - Issue 147: OpenApi specs generation - -commit 0b3497b563d34133ba9ba81f9ed1a1bd267bb000 -Author: Marcin Słowiak -Date: Fri Oct 2 22:19:30 2020 +0200 - - Issue #147: Fix test assertNotNull import - -commit b4cf703aff38c9a1887f4f8d0548f58932a451d7 -Author: Marcin Słowiak -Date: Fri Oct 2 22:19:08 2020 +0200 - - Issue #147: Add api module with OpenApi schema and generator part - -commit 3e1a3b96cfdd0c786efc338e86c5c5ce7f1358b2 -Merge: b3e3292 4734714 -Author: Prathab -Date: Fri Oct 2 21:34:21 2020 +0530 - - Merge pull request #146 from mslowiak/feature/multi-module-project - - Reorganize project to be multi module - -commit 4734714118c046e6d44d30acf88441cdf183ca14 -Author: Marcin Słowiak -Date: Fri Oct 2 17:58:40 2020 +0200 - - Update project after amenity rebranding - -commit 134a974a1ebc9179ca701ca1290d319641db07a3 -Author: Marcin Słowiak -Date: Thu Oct 1 22:42:08 2020 +0200 - - Reorganize project to be multi module - -commit b3e3292e5af40db29a0ab7f41e21726914701b63 -Merge: 22f9c82 d7f1729 -Author: Prathab -Date: Fri Oct 2 11:48:22 2020 +0530 - - Merge pull request #144 from edwardUL99/feature/111--Update_amenity_endpoint - - Issue 111: Endpoint for updating an amenity - -commit d7f1729af7f3d31c6a1e30ea60c9596131bec16f -Author: Edward Lynch-Milner <18222021@studentmail.ul.ie> -Date: Thu Oct 1 23:43:02 2020 +0100 - - Fixed update amenity NULL issue - -commit f400ff74ac3492839c50792c8ed108f3f73d8d3e -Merge: 5d98df0 22f9c82 -Author: Edward Lynch-Milner <18222021@studentmail.ul.ie> -Date: Thu Oct 1 23:36:47 2020 +0100 - - Merge branch 'master' of github.com:jmprathab/MyHome - -commit 22f9c82a5783fceb9f6cebe30f163c24b2184f71 -Merge: 2bed1cd b197906 -Author: Prathab -Date: Tue Sep 29 20:28:42 2020 +0530 - - Merge pull request #145 from mslowiak/feature/issue-108--add-amenity-to-community - - Issue #108: Add amenity to community - -commit 5d98df0af98384522a8a3611575ec906e6b94518 -Merge: c6972c1 7a67381 -Author: Edward Lynch-Milner <18222021@studentmail.ul.ie> -Date: Sun Sep 27 22:15:33 2020 +0100 - - Merge branch 'feature/111--Update_amenity_endpoint' of https://github.com/edwardUL99/MyHome into feature/111--Update_amenity_endpoint - -commit c6972c1f7892c7a1a81c800a9d1d0471e4c31892 -Author: Edward Lynch-Milner <18222021@studentmail.ul.ie> -Date: Sun Sep 27 22:15:20 2020 +0100 - - Code changes based on @mslowiak's reviews - -commit b197906dc421fbb1f0ecc567695cf664978f6353 -Author: Marcin Słowiak -Date: Sat Sep 26 16:37:29 2020 +0200 - - Issue #108: Fix data.sql - -commit e7ef0b83185aa07bdd37749442c6102e768b344e -Author: Marcin Słowiak -Date: Sat Sep 26 16:27:29 2020 +0200 - - Issue #108: Add unit tests - -commit 051f4b24550ca39c1bb75706fa2b4b8bcc21865c -Author: Marcin Słowiak -Date: Sat Sep 26 15:39:46 2020 +0200 - - Issue #108: Add amenity to community - -commit 911b3a9f7ef7586d86c335ed848fc4a52081ba66 -Author: Marcin Słowiak -Date: Sat Sep 26 12:02:12 2020 +0200 - - Issue #108: Rename CommunityAmenity to Amenity in all places - -commit 2bed1cd045caed5614699abe5d3ed2723da95fbb -Merge: 493ea91 ef7631f -Author: Prathab -Date: Tue Sep 22 16:38:26 2020 +0530 - - Merge pull request #143 from DDmit04/feature/119--hibernate-query-perfomance - - Issue 119: Community hibernate query perfomance - -commit ef7631f316bbbf6e8b1bc24ddd1631a007a81c86 -Author: Дмитроченков Даниил Андреевич -Date: Thu Sep 17 14:29:44 2020 +0300 - - improve tests - -commit 7a6738159910390b0b11482a70b11dd364c9f799 -Merge: 9ed1f71 493ea91 -Author: Edward Lynch-Milner <47575833+edwardUL99@users.noreply.github.com> -Date: Mon Sep 14 19:33:31 2020 +0100 - - Merge branch 'master' into feature/111--Update_amenity_endpoint - -commit 9ed1f719174bbc33049943f517d25c106f179a55 -Author: Edward Lynch-Milner <18222021@studentmail.ul.ie> -Date: Mon Sep 14 19:24:08 2020 +0100 - - Finished coding and testing for issue #111 - -commit 039126b2aaecb8c51d178848cd36ffede54e303e -Author: Дмитроченков Даниил Андреевич -Date: Mon Sep 14 19:54:17 2020 +0300 - - fix tests - -commit 61ee0b6da85e70082f39193e2b17c9efe869c4bf -Author: Дмитроченков Даниил Андреевич -Date: Mon Sep 14 19:53:51 2020 +0300 - - fix CommunitySDJpaService - -commit 2151c1f4c8b5fa212b0ac40ffc979580df2f3439 -Merge: c2f0cff 493ea91 -Author: DDmit04 <46588421+DDmit04@users.noreply.github.com> -Date: Mon Sep 14 17:39:38 2020 +0300 - - Merge branch 'master' into feature/119--hibernate-query-perfomance - -commit 493ea91fb79459dfa8a543752c76fbf70a3f0241 -Merge: 7c7ace4 3427dcd -Author: Prathab -Date: Mon Sep 14 18:43:49 2020 +0530 - - Merge pull request #141 from edwardUL99/feature/140--CommunitySDJpaServiceTest_deleteCommunity_fails - - Issue 140: CommunitySDJpaServiceTest deleteCommunity fails - -commit 3427dcdc701accc2b1abc2b6612de7a96d291e10 -Merge: 8e41750 d3d87a3 -Author: Edward Lynch-Milner <18222021@studentmail.ul.ie> -Date: Thu Sep 10 20:10:16 2020 +0100 - - Rebasing - -commit 8e41750a0f0daac9846eeb937f8dfe898cf5a966 -Author: Edward Lynch-Milner <18222021@studentmail.ul.ie> -Date: Thu Sep 3 08:17:09 2020 +0100 - - Added one more unit test for PaymentController - -commit de7dba9859593f64ea088e96e5154db552381bc9 -Author: Edward Lynch-Milner <18222021@studentmail.ul.ie> -Date: Wed Sep 2 23:46:04 2020 +0100 - - Changed communityOptional.isPresent in CommunityController.removeCommunityHouse to filer and map - -commit 18ebb4a4346bb21b50f4bdc67eedcb41d37956ea -Author: Edward Lynch-Milner <18222021@studentmail.ul.ie> -Date: Mon Aug 31 20:44:23 2020 +0100 - - Fixed CommunitySDJpaServiceTest - -commit 3df0a8ce0565fc163494b9d826072f7c86143821 -Author: Edward Lynch-Milner <18222021@studentmail.ul.ie> -Date: Wed Sep 2 19:40:16 2020 +0100 - - Fixed all code review items and errors - -commit d3d87a35ec3d1abe67f0a75b49b5a27d06d1cf10 -Merge: ab8c270 7c7ace4 -Author: Edward Lynch-Milner <47575833+edwardUL99@users.noreply.github.com> -Date: Mon Sep 7 20:31:19 2020 +0100 - - Merge branch 'master' into feature/140--CommunitySDJpaServiceTest_deleteCommunity_fails From d80b572dde6bca37cc476e8afb55885e26fec0da Mon Sep 17 00:00:00 2001 From: hsergiu <57728877+hsergiu@users.noreply.github.com> Date: Tue, 16 Mar 2021 12:08:41 +0200 Subject: [PATCH 3/4] Issue #220:updated deleteBooking --- .../myhome/controllers/BookingController.java | 2 +- .../main/java/com/myhome/domain/Amenity.java | 29 +++++++++++++++---- .../com/myhome/domain/AmenityBookingItem.java | 22 +++++++------- .../AmenityBookingItemRepository.java | 9 ++---- .../com/myhome/services/BookingService.java | 2 +- .../springdatajpa/BookingSDJpaService.java | 26 ++++++++++++----- .../springdatajpa/CommunitySDJpaService.java | 2 +- .../controllers/BookingControllerTest.java | 8 ++--- .../unit/BookingSDJpaServiceTest.java | 9 ++++-- 9 files changed, 69 insertions(+), 40 deletions(-) diff --git a/service/src/main/java/com/myhome/controllers/BookingController.java b/service/src/main/java/com/myhome/controllers/BookingController.java index e9763925..2c003087 100644 --- a/service/src/main/java/com/myhome/controllers/BookingController.java +++ b/service/src/main/java/com/myhome/controllers/BookingController.java @@ -19,7 +19,7 @@ public class BookingController implements BookingsApi { @Override public ResponseEntity deleteBooking(@PathVariable String amenityId, @PathVariable String bookingId) { - boolean isBookingDeleted = bookingSDJpaService.deleteBooking(bookingId); + boolean isBookingDeleted = bookingSDJpaService.deleteBooking(amenityId, bookingId); if (isBookingDeleted) { return ResponseEntity.status(HttpStatus.NO_CONTENT).build(); } else { diff --git a/service/src/main/java/com/myhome/domain/Amenity.java b/service/src/main/java/com/myhome/domain/Amenity.java index 932917d6..56093693 100644 --- a/service/src/main/java/com/myhome/domain/Amenity.java +++ b/service/src/main/java/com/myhome/domain/Amenity.java @@ -17,16 +17,21 @@ package com.myhome.domain; import java.math.BigDecimal; +import java.util.HashSet; +import java.util.Set; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.ManyToOne; import javax.persistence.NamedAttributeNode; import javax.persistence.NamedEntityGraph; +import javax.persistence.NamedEntityGraphs; +import javax.persistence.OneToMany; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; +import lombok.ToString; import lombok.With; @Entity @@ -35,12 +40,21 @@ @Getter @Setter @With -@NamedEntityGraph( - name = "Amenity.community", - attributeNodes = { - @NamedAttributeNode("community"), - } -) +@NamedEntityGraphs({ + @NamedEntityGraph( + name = "Amenity.community", + attributeNodes = { + @NamedAttributeNode("community"), + } + ), + @NamedEntityGraph( + name = "Amenity.bookingItems", + attributeNodes = { + @NamedAttributeNode("bookingItems"), + } + ) +}) + public class Amenity extends BaseEntity { @Column(nullable = false, unique = true) private String amenityId; @@ -54,4 +68,7 @@ public class Amenity extends BaseEntity { private Community community; @ManyToOne private CommunityHouse communityHouse; + @ToString.Exclude + @OneToMany(fetch = FetchType.LAZY, mappedBy = "amenity") + private Set bookingItems = new HashSet<>(); } diff --git a/service/src/main/java/com/myhome/domain/AmenityBookingItem.java b/service/src/main/java/com/myhome/domain/AmenityBookingItem.java index 7b8056fd..f1b923f3 100644 --- a/service/src/main/java/com/myhome/domain/AmenityBookingItem.java +++ b/service/src/main/java/com/myhome/domain/AmenityBookingItem.java @@ -29,18 +29,18 @@ @Setter @With @NamedEntityGraphs({ - @NamedEntityGraph( - name="AmenityBookingItem.amenity", - attributeNodes = { - @NamedAttributeNode("amenity"), - }), - @NamedEntityGraph( - name="AmenityBookingItem.bookingUser", - attributeNodes = { - @NamedAttributeNode("bookingUser"), - }) - + @NamedEntityGraph( + name = "AmenityBookingItem.amenity", + attributeNodes = { + @NamedAttributeNode("amenity"), + }), + @NamedEntityGraph( + name = "AmenityBookingItem.bookingUser", + attributeNodes = { + @NamedAttributeNode("bookingUser"), + }) }) + public class AmenityBookingItem extends BaseEntity { @Column(nullable = false, unique = true) diff --git a/service/src/main/java/com/myhome/repositories/AmenityBookingItemRepository.java b/service/src/main/java/com/myhome/repositories/AmenityBookingItemRepository.java index 5e3ce8e1..38bb604f 100644 --- a/service/src/main/java/com/myhome/repositories/AmenityBookingItemRepository.java +++ b/service/src/main/java/com/myhome/repositories/AmenityBookingItemRepository.java @@ -1,14 +1,9 @@ package com.myhome.repositories; -import com.myhome.domain.Amenity; import com.myhome.domain.AmenityBookingItem; -import org.springframework.data.jpa.repository.EntityGraph; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.Query; -import org.springframework.data.repository.query.Param; - import java.util.Optional; +import org.springframework.data.jpa.repository.JpaRepository; public interface AmenityBookingItemRepository extends JpaRepository { - Optional findByAmenityBookingItemId(String amenityBookingItemId); + Optional findByAmenityBookingItemId(String amenityBookingItemId); } diff --git a/service/src/main/java/com/myhome/services/BookingService.java b/service/src/main/java/com/myhome/services/BookingService.java index b65aa29d..21169b9b 100644 --- a/service/src/main/java/com/myhome/services/BookingService.java +++ b/service/src/main/java/com/myhome/services/BookingService.java @@ -2,6 +2,6 @@ public interface BookingService { - boolean deleteBooking(String bookingId); + boolean deleteBooking(String amenityId, String bookingId); } diff --git a/service/src/main/java/com/myhome/services/springdatajpa/BookingSDJpaService.java b/service/src/main/java/com/myhome/services/springdatajpa/BookingSDJpaService.java index 38854ae5..407f5465 100644 --- a/service/src/main/java/com/myhome/services/springdatajpa/BookingSDJpaService.java +++ b/service/src/main/java/com/myhome/services/springdatajpa/BookingSDJpaService.java @@ -1,7 +1,12 @@ package com.myhome.services.springdatajpa; +import com.myhome.domain.Amenity; +import com.myhome.domain.AmenityBookingItem; import com.myhome.repositories.AmenityBookingItemRepository; +import com.myhome.repositories.AmenityRepository; import com.myhome.services.BookingService; +import java.util.Optional; +import javax.transaction.Transactional; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; @@ -11,13 +16,20 @@ public class BookingSDJpaService implements BookingService { private final AmenityBookingItemRepository bookingRepository; + @Transactional @Override - public boolean deleteBooking(String bookingId) { - return bookingRepository.findByAmenityBookingItemId(bookingId) - .map(bookingItem -> { - bookingRepository.delete(bookingItem); - return true; - }) - .orElse(false); + public boolean deleteBooking(String amenityId, String bookingId) { + Optional booking = + bookingRepository.findByAmenityBookingItemId(bookingId); + return booking.map(bookingItem -> { + boolean amenityFound = + bookingItem.getAmenity().getAmenityId().equals(amenityId); + if (amenityFound) { + bookingRepository.delete(bookingItem); + return true; + } else { + return false; + } + }).orElse(false); } } diff --git a/service/src/main/java/com/myhome/services/springdatajpa/CommunitySDJpaService.java b/service/src/main/java/com/myhome/services/springdatajpa/CommunitySDJpaService.java index 8182a56e..3bfd7bea 100644 --- a/service/src/main/java/com/myhome/services/springdatajpa/CommunitySDJpaService.java +++ b/service/src/main/java/com/myhome/services/springdatajpa/CommunitySDJpaService.java @@ -55,7 +55,7 @@ public Community createCommunity(CommunityDto communityDto) { communityDto.setCommunityId(generateUniqueId()); String userId = (String) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); Community community = addAdminToCommunity(communityMapper.communityDtoToCommunity(communityDto), - userId); + userId); Community savedCommunity = communityRepository.save(community); log.trace("saved community with id[{}] to repository", savedCommunity.getId()); return savedCommunity; diff --git a/service/src/test/java/com/myhome/controllers/BookingControllerTest.java b/service/src/test/java/com/myhome/controllers/BookingControllerTest.java index 304bd937..5851036c 100644 --- a/service/src/test/java/com/myhome/controllers/BookingControllerTest.java +++ b/service/src/test/java/com/myhome/controllers/BookingControllerTest.java @@ -33,7 +33,7 @@ private void init() { @Test void deleteBooking() { // given - given(bookingSDJpaService.deleteBooking(TEST_BOOKING_ID)) + given(bookingSDJpaService.deleteBooking(TEST_AMENITY_ID, TEST_BOOKING_ID)) .willReturn(true); // when @@ -43,13 +43,13 @@ void deleteBooking() { // then assertNull(response.getBody()); assertEquals(HttpStatus.NO_CONTENT, response.getStatusCode()); - verify(bookingSDJpaService).deleteBooking(TEST_BOOKING_ID); + verify(bookingSDJpaService).deleteBooking(TEST_AMENITY_ID, TEST_BOOKING_ID); } @Test void deleteBookingNotExists() { // given - given(bookingSDJpaService.deleteBooking(TEST_BOOKING_ID)) + given(bookingSDJpaService.deleteBooking(TEST_AMENITY_ID, TEST_BOOKING_ID)) .willReturn(false); // when @@ -59,6 +59,6 @@ void deleteBookingNotExists() { // then assertNull(response.getBody()); assertEquals(HttpStatus.NOT_FOUND, response.getStatusCode()); - verify(bookingSDJpaService).deleteBooking(TEST_BOOKING_ID); + verify(bookingSDJpaService).deleteBooking(TEST_AMENITY_ID, TEST_BOOKING_ID); } } diff --git a/service/src/test/java/com/myhome/services/unit/BookingSDJpaServiceTest.java b/service/src/test/java/com/myhome/services/unit/BookingSDJpaServiceTest.java index 3e2d3c34..0e5b4804 100644 --- a/service/src/test/java/com/myhome/services/unit/BookingSDJpaServiceTest.java +++ b/service/src/test/java/com/myhome/services/unit/BookingSDJpaServiceTest.java @@ -3,6 +3,7 @@ import com.myhome.domain.AmenityBookingItem; import com.myhome.repositories.AmenityBookingItemRepository; import com.myhome.services.springdatajpa.BookingSDJpaService; +import helpers.TestUtils; import java.util.Optional; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -20,6 +21,8 @@ public class BookingSDJpaServiceTest { private static final String TEST_BOOKING_ID = "test-booking-id"; + private static final String TEST_AMENITY_ID = "test-amenity-id"; + private final String TEST_AMENITY_DESCRIPTION = "test-amenity-description"; @Mock private AmenityBookingItemRepository bookingItemRepository; @@ -39,9 +42,11 @@ void deleteBookingItem() { given(bookingItemRepository.findByAmenityBookingItemId(TEST_BOOKING_ID)) .willReturn(Optional.of(testBookingItem)); + testBookingItem.setAmenity(TestUtils.AmenityHelpers + .getTestAmenity(TEST_AMENITY_ID, TEST_AMENITY_DESCRIPTION)); // when - boolean bookingDeleted = bookingSDJpaService.deleteBooking(TEST_BOOKING_ID); + boolean bookingDeleted = bookingSDJpaService.deleteBooking(TEST_AMENITY_ID, TEST_BOOKING_ID); // then assertTrue(bookingDeleted); @@ -56,7 +61,7 @@ void deleteBookingNotExists() { .willReturn(Optional.empty()); // when - boolean bookingDeleted = bookingSDJpaService.deleteBooking(TEST_BOOKING_ID); + boolean bookingDeleted = bookingSDJpaService.deleteBooking(TEST_AMENITY_ID, TEST_BOOKING_ID); // then assertFalse(bookingDeleted); From d60507e38595d32a00db0ad7ba1cba96d789d24f Mon Sep 17 00:00:00 2001 From: hsergiu <57728877+hsergiu@users.noreply.github.com> Date: Tue, 16 Mar 2021 12:36:11 +0200 Subject: [PATCH 4/4] Issue #220:improve coverage --- .../springdatajpa/BookingSDJpaService.java | 2 -- .../unit/BookingSDJpaServiceTest.java | 21 +++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/service/src/main/java/com/myhome/services/springdatajpa/BookingSDJpaService.java b/service/src/main/java/com/myhome/services/springdatajpa/BookingSDJpaService.java index 407f5465..6f17fe54 100644 --- a/service/src/main/java/com/myhome/services/springdatajpa/BookingSDJpaService.java +++ b/service/src/main/java/com/myhome/services/springdatajpa/BookingSDJpaService.java @@ -1,9 +1,7 @@ package com.myhome.services.springdatajpa; -import com.myhome.domain.Amenity; import com.myhome.domain.AmenityBookingItem; import com.myhome.repositories.AmenityBookingItemRepository; -import com.myhome.repositories.AmenityRepository; import com.myhome.services.BookingService; import java.util.Optional; import javax.transaction.Transactional; diff --git a/service/src/test/java/com/myhome/services/unit/BookingSDJpaServiceTest.java b/service/src/test/java/com/myhome/services/unit/BookingSDJpaServiceTest.java index 0e5b4804..f372fcf9 100644 --- a/service/src/test/java/com/myhome/services/unit/BookingSDJpaServiceTest.java +++ b/service/src/test/java/com/myhome/services/unit/BookingSDJpaServiceTest.java @@ -12,6 +12,7 @@ import org.mockito.MockitoAnnotations; import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.BDDMockito.given; @@ -22,6 +23,7 @@ public class BookingSDJpaServiceTest { private static final String TEST_BOOKING_ID = "test-booking-id"; private static final String TEST_AMENITY_ID = "test-amenity-id"; + private static final String TEST_AMENITY_ID_2 = "test-amenity-id-2"; private final String TEST_AMENITY_DESCRIPTION = "test-amenity-description"; @Mock @@ -69,6 +71,25 @@ void deleteBookingNotExists() { verify(bookingItemRepository, never()).delete(any()); } + @Test + void deleteBookingAmenityNotExists() { + // given + AmenityBookingItem testBookingItem = getTestBookingItem(); + + given(bookingItemRepository.findByAmenityBookingItemId(TEST_BOOKING_ID)) + .willReturn(Optional.of(testBookingItem)); + testBookingItem.setAmenity(TestUtils.AmenityHelpers + .getTestAmenity(TEST_AMENITY_ID_2, TEST_AMENITY_DESCRIPTION)); + // when + boolean bookingDeleted = bookingSDJpaService.deleteBooking(TEST_AMENITY_ID, TEST_BOOKING_ID); + + // then + assertFalse(bookingDeleted); + assertNotEquals(TEST_AMENITY_ID, testBookingItem.getAmenity().getAmenityId()); + verify(bookingItemRepository).findByAmenityBookingItemId(TEST_BOOKING_ID); + verify(bookingItemRepository, never()).delete(any()); + } + private AmenityBookingItem getTestBookingItem() { return new AmenityBookingItem() .withAmenityBookingItemId(TEST_BOOKING_ID);