Skip to content
GitLab
Explore
Sign in
Show whitespace changes
Inline
Side-by-side
src/test/java/it/inaf/ia2/transfer/persistence/JobDAOTest.java
View file @
3388d413
...
...
@@ -5,8 +5,7 @@
*/
package
it.inaf.ia2.transfer.persistence
;
import
it.inaf.ia2.transfer.exception.JobException
;
import
it.inaf.ia2.transfer.exception.JobException.Type
;
import
it.inaf.oats.vospace.exception.InternalFaultException
;
import
javax.sql.DataSource
;
import
org.junit.jupiter.api.BeforeEach
;
import
org.junit.jupiter.api.extension.ExtendWith
;
...
...
@@ -52,8 +51,7 @@ public class JobDAOTest {
assertEquals
(
ExecutionPhase
.
QUEUED
,
dao
.
getJobPhase
(
"pippo3"
));
JobException
jobError
=
new
JobException
(
Type
.
FATAL
,
"Error message"
)
.
setErrorDetail
(
"Error detail"
);
InternalFaultException
jobError
=
new
InternalFaultException
(
"Error detail"
);
dao
.
setJobError
(
"pippo3"
,
jobError
);
...
...
src/test/java/it/inaf/ia2/transfer/service/ArchiveServiceTest.java
View file @
3388d413
...
...
@@ -6,11 +6,11 @@
package
it.inaf.ia2.transfer.service
;
import
it.inaf.ia2.transfer.auth.TokenPrincipal
;
import
it.inaf.ia2.transfer.exception.InsufficientStorageException
;
import
it.inaf.ia2.transfer.persistence.FileDAO
;
import
it.inaf.ia2.transfer.persistence.JobDAO
;
import
it.inaf.ia2.transfer.persistence.LocationDAO
;
import
it.inaf.ia2.transfer.persistence.model.FileInfo
;
import
it.inaf.oats.vospace.exception.QuotaExceededException
;
import
java.io.ByteArrayInputStream
;
import
java.io.File
;
import
java.io.FileInputStream
;
...
...
@@ -151,7 +151,7 @@ public class ArchiveServiceTest {
fos
.
write
(
junk
);
}
Assertions
.
assertThrows
(
InsufficientStorage
Exception
.
class
,
()
->
{
Assertions
.
assertThrows
(
QuotaExceeded
Exception
.
class
,
()
->
{
archiveService
.
createArchive
(
job
);
});
}
...
...
Prev
1
2
Next