Skip to content

Commit

Permalink
Removing sample data generation
Browse files Browse the repository at this point in the history
Removing the mocked data service run annotation to stop it running
  • Loading branch information
rossdrew committed Apr 12, 2024
1 parent 873c2cc commit 53085d2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/main/java/com/rox/journal/MockedDataService.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@
import com.rox.journal.entry.JournalEntry;
import com.rox.journal.task.Task;
import com.rox.journal.task.TaskService;
import org.springframework.stereotype.Repository;

import javax.annotation.PostConstruct;

/**
* FOR DEBUG ONLY
*
* Sets up some mock data in the services
**/
@Repository
//@Repository
public class MockedDataService {
private final JournalEntriesService journalEntriesService;
private final TaskService taskService;
Expand Down Expand Up @@ -44,6 +42,12 @@ public void initialize() throws InterruptedException {
journalEntriesService.append(journalEntry5);
Thread.sleep(100);

for (int entryIndex = 6; entryIndex < 24; entryIndex++){
final JournalEntry journalEntry = JournalEntry.create("This is TEST journal entry No."+entryIndex);
journalEntriesService.append(journalEntry);
Thread.sleep(100);
}

final Task sampleTask = new Task("Sample Task from 2-4");
sampleTask.startedAt(journalEntry2).completeAsOf(journalEntry4);
taskService.append(sampleTask);
Expand Down

0 comments on commit 53085d2

Please sign in to comment.