Compare commits
6 Commits
b57dcdce3e
...
05b876bea7
Author | SHA1 | Date |
---|---|---|
Craig Oates | 05b876bea7 | 3 years ago |
Craig Oates | 8f8cd147ce | 3 years ago |
Craig Oates | 943a912d96 | 3 years ago |
Craig Oates | 26b025361d | 3 years ago |
Craig Oates | aa1abec7fe | 3 years ago |
Craig Oates | 00ba38f3b0 | 3 years ago |
8 changed files with 85 additions and 3 deletions
@ -1,3 +1,3 @@ |
|||||||
# ritherdon-rest |
# Ritherdon REST |
||||||
|
|
||||||
A CLI program which grabs data from the Return to Ritherdon project's REST API server. |
A CLI program which grabs data from the Return to Ritherdon project's REST API server. |
||||||
|
@ -0,0 +1,30 @@ |
|||||||
|
;;;; ritherdon-rest.asd |
||||||
|
|
||||||
|
(asdf:defsystem #:ritherdon-rest |
||||||
|
:description "Grabs data from the Return to Ritherdon project REST |
||||||
|
API and prints out the results." |
||||||
|
:author "craig@craigoates.net" |
||||||
|
:license "MIT" |
||||||
|
:version "0.0.1" |
||||||
|
:serial t |
||||||
|
:in-order-to ((test-op (test-op "ritherdon-rest/tests"))) |
||||||
|
:pathname "src/" |
||||||
|
:components ((:file "package") |
||||||
|
(:file "ritherdon-rest"))) |
||||||
|
|
||||||
|
;; The use of '...rest/tests' was because of a warning when trying to |
||||||
|
;; run the code in SLIME. |
||||||
|
(asdf:defsystem #:ritherdon-rest/tests |
||||||
|
:description "The test suite for the ritherdon-rest project." |
||||||
|
:author "craig@craigoates.net" |
||||||
|
:license "MIT" |
||||||
|
:version "0.0.1" |
||||||
|
:serial t |
||||||
|
:depends-on (:ritherdon-rest :fiveam) |
||||||
|
:perform (test-op (o s) |
||||||
|
(uiop:symbol-call :fiveam :run! |
||||||
|
'ritherdon-rest-tests:all-tests)) |
||||||
|
:components ((:module "tests" |
||||||
|
:serial t |
||||||
|
:components ((:file "package") |
||||||
|
(:file "ritherdon-rest-tests"))))) |
@ -0,0 +1,4 @@ |
|||||||
|
;;;; package.lisp |
||||||
|
|
||||||
|
(defpackage #:ritherdon-rest |
||||||
|
(:use #:cl)) |
@ -0,0 +1,6 @@ |
|||||||
|
;;;; ritherdon-rest.lisp |
||||||
|
|
||||||
|
(in-package #:ritherdon-rest) |
||||||
|
|
||||||
|
(defun hello () |
||||||
|
(print "The system is up and running.")) |
@ -0,0 +1,6 @@ |
|||||||
|
;;;; package.lisp |
||||||
|
|
||||||
|
(defpackage #:ritherdon-rest-tests |
||||||
|
(:use #:cl #:fiveam) |
||||||
|
(:export #:run! |
||||||
|
#:all-tests)) |
@ -0,0 +1,35 @@ |
|||||||
|
;;;; ritherdon-rest-tests.lisp |
||||||
|
|
||||||
|
(in-package #:ritherdon-rest-tests) |
||||||
|
|
||||||
|
(def-suite all-tests |
||||||
|
:description "The master suite of all ritherdon-rest tests.") |
||||||
|
|
||||||
|
(in-suite all-tests) |
||||||
|
|
||||||
|
;; These two examples show the 'full' call to the fiveAm test |
||||||
|
;; functions. This is just for reference. The 'namespace' is already |
||||||
|
;; 'imported' in 'package.lisp'. |
||||||
|
|
||||||
|
;; (fiveam:test sum-1 |
||||||
|
;; (fiveam:is (= 3 (+ 1 2)))) |
||||||
|
|
||||||
|
;; (fiveam:run!) |
||||||
|
|
||||||
|
;; How you would normally create the tests -- with fiveAM already |
||||||
|
;; set-up in 'package.lisp' and not needing to be explicit about it |
||||||
|
;; here. This is similar to 'using static' in C#. |
||||||
|
|
||||||
|
(defun test-quasi() |
||||||
|
(run! 'all-tests)) |
||||||
|
|
||||||
|
(test dummy-tests |
||||||
|
"Just a placeholder." |
||||||
|
(is (listp (list 1 2))) |
||||||
|
(is (= 5 (+ 2 3))) |
||||||
|
(is (< 4 (+ 100 400)))) |
||||||
|
|
||||||
|
(test dummy-tests-two |
||||||
|
"This is another placeholder test. |
||||||
|
This is just to make sure everything is set-up properly." |
||||||
|
(is (equal 4 4))) |
Reference in new issue