-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Corrected hour format of the generated markdown and updated the Repor…
…tDataController test.
- Loading branch information
1 parent
e3c3e91
commit 819a746
Showing
4 changed files
with
117 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
.../test/java/com/objectcomputing/checkins/services/reports/FileServicesImplReplacement.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
package com.objectcomputing.checkins.services.reports; | ||
|
||
/************************************************************************* | ||
* | ||
* This class is here due to the fact that the ReportDataController now | ||
* references the FileServices. The real FileServicesImpl requires the | ||
* GoogleApiAccess class that does not exist during testing. | ||
* | ||
* This replacement class does not require that and can help us test the | ||
* output of the MarkdownGeneration class. | ||
* | ||
************************************************************************/ | ||
|
||
import com.objectcomputing.checkins.services.file.FileInfoDTO; | ||
import com.objectcomputing.checkins.services.file.FileServices; | ||
import com.objectcomputing.checkins.services.file.FileServicesImpl; | ||
|
||
import io.micronaut.http.multipart.CompletedFileUpload; | ||
|
||
import java.io.File; | ||
import java.util.Set; | ||
import java.util.HashSet; | ||
import java.util.UUID; | ||
|
||
import jakarta.inject.Singleton; | ||
import io.micronaut.context.env.Environment; | ||
import io.micronaut.context.annotation.Replaces; | ||
import io.micronaut.context.annotation.Requires; | ||
|
||
@Singleton | ||
@Replaces(FileServicesImpl.class) | ||
@Requires(env = Environment.TEST) | ||
public class FileServicesImplReplacement implements FileServices { | ||
public String documentName = ""; | ||
public String documentText = ""; | ||
|
||
public Set<FileInfoDTO> findFiles(UUID checkInId) { | ||
return new HashSet<FileInfoDTO>(); | ||
} | ||
|
||
public File downloadFiles(String uploadDocId) { | ||
return null; | ||
} | ||
|
||
public FileInfoDTO uploadFile(UUID checkInID, CompletedFileUpload file) { | ||
return new FileInfoDTO(); | ||
} | ||
|
||
public FileInfoDTO uploadDocument(String directory, | ||
String name, String text) { | ||
documentName = name; | ||
documentText = text; | ||
return new FileInfoDTO(); | ||
} | ||
|
||
public boolean deleteFile(String uploadDocId) { | ||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters