Skip to content

Commit

Permalink
move all review day files into vocab package
Browse files Browse the repository at this point in the history
  • Loading branch information
nora-kauczor committed Nov 11, 2024
1 parent a2ce995 commit 8cfdc0b
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.example.backend.review;
package org.example.backend.vocab;

import org.springframework.data.annotation.Id;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.example.backend.review;
package org.example.backend.vocab;

import lombok.RequiredArgsConstructor;

Expand All @@ -17,7 +17,7 @@ public class ReviewDayController {
private final ReviewDayService vocabsOfDayService;

@GetMapping
public ReviewDay getReviewDay(@RequestParam String language, @AuthenticationPrincipal OAuth2User user) throws LanguageNotFoundException {
public ReviewDay getReviewDay(@RequestParam String language, @AuthenticationPrincipal OAuth2User user) {
return vocabsOfDayService.getReviewDay(language, user.getAttribute("sub"), ZonedDateTime.now().toLocalDate());
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.example.backend.review;
package org.example.backend.vocab;


import org.springframework.data.mongodb.repository.MongoRepository;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
package org.example.backend.review;
package org.example.backend.vocab;

import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
import org.example.backend.exception.LanguageNotFoundException;
import org.example.backend.exception.UserNotFoundException;
import org.example.backend.vocab.Language;
import org.example.backend.vocab.Vocab;
import org.example.backend.vocab.VocabRepo;
import org.example.backend.vocab.VocabService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.example.backend.review;
package org.example.backend.vocab;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
package org.example.backend.review;
package org.example.backend.vocab;

import org.example.backend.exception.LanguageNotFoundException;
import org.example.backend.exception.UserNotFoundException;
import org.example.backend.vocab.Language;
import org.example.backend.vocab.Vocab;
import org.example.backend.vocab.VocabRepo;
import org.example.backend.vocab.VocabService;
import org.junit.jupiter.api.Test;

import java.time.LocalDate;
Expand All @@ -20,8 +16,6 @@
class ReviewDayServiceTest {
private final ReviewDayRepo mockReviewRepo = mock(ReviewDayRepo.class);
private final VocabService mockVocabService = mock(VocabService.class);
// private final VocabRepo mockVocabRepo = mock(VocabRepo.class); // TEST
// private final ReviewDayService reviewService = new ReviewDayService(mockReviewRepo, mockVocabService, mockVocabRepo); // TEST
private final ReviewDayService reviewService = new ReviewDayService(mockReviewRepo, mockVocabService);

@Test
Expand Down

0 comments on commit 8cfdc0b

Please sign in to comment.