aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/specification/aedifex/repository.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/specification/aedifex/repository.lux')
-rw-r--r--stdlib/source/specification/aedifex/repository.lux59
1 files changed, 0 insertions, 59 deletions
diff --git a/stdlib/source/specification/aedifex/repository.lux b/stdlib/source/specification/aedifex/repository.lux
deleted file mode 100644
index 52a7e1bfe..000000000
--- a/stdlib/source/specification/aedifex/repository.lux
+++ /dev/null
@@ -1,59 +0,0 @@
-(.require
- [library
- [lux (.except)
- [abstract
- [monad (.only do)]]
- [control
- ["[0]" try (.only Try)]
- [concurrency
- ["[0]" async (.only Async)]]]
- [data
- ["[0]" binary (.only)
- ["_[1]" \\test]]]
- [math
- ["[0]" random]]
- [test
- ["[0]" unit]
- ["_" property (.only Test)]]]]
- [\\program
- ["[0]" / (.only)
- ["[1][0]" remote]
- ["/[1]" //
- ["[1][0]" artifact (.only Artifact)
- ["[1]/[0]" extension]]]]]
- [\\test
- ["_[0]" //
- ["[1][0]" artifact]]])
-
-(def .public (spec valid_artifact invalid_artifact subject)
- (-> Artifact Artifact (/.Repository Async) Test)
- (do random.monad
- [expected (_binary.random 100)]
- (in (all unit.and
- (do async.monad
- [.let [good_uri (/remote.uri (the //artifact.#version valid_artifact) valid_artifact //artifact/extension.lux_library)]
- good_upload! (of subject upload good_uri expected)
- good_download! (of subject download good_uri)
-
- .let [bad_uri (/remote.uri (the //artifact.#version invalid_artifact) invalid_artifact //artifact/extension.lux_library)]
- bad_upload! (of subject upload bad_uri expected)
- bad_download! (of subject download bad_uri)]
- (unit.coverage [/.Repository]
- (let [successfull_flow!
- (when [good_upload! good_download!]
- [{try.#Success _} {try.#Success actual}]
- (of binary.equivalence = expected actual)
-
- _
- false)
-
- failed_flow!
- (when [bad_upload! bad_download!]
- [{try.#Failure _} {try.#Failure _}]
- true
-
- _
- false)]
- (and successfull_flow!
- failed_flow!))))
- ))))