File: test_services.clj

package info (click to toggle)
trapperkeeper-clojure 4.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 964 kB
  • sloc: sh: 189; xml: 73; makefile: 25; java: 5
file content (57 lines) | stat: -rw-r--r-- 1,074 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
(ns puppetlabs.trapperkeeper.examples.bootstrapping.test-services
  (:require [puppetlabs.trapperkeeper.core :refer [defservice]]))

(defn invalid-service-graph-service
  []
  {:test-service "hi"})

(defprotocol HelloWorldService
  (hello-world [this]))

(defprotocol TestService
  (test-fn [this]))

(defprotocol TestServiceTwo
  (test-fn-two [this]))

(defprotocol TestServiceThree
  (test-fn-three [this]))

(defservice hello-world-service
  HelloWorldService
  []
  (hello-world [this] "hello world"))

(defservice foo-test-service
  TestService
  []
  (test-fn [this] :foo))

(defservice classpath-test-service
  TestService
  []
  (test-fn [this] :classpath))

(defservice cwd-test-service
  TestService
  []
  (test-fn [this] :cwd))

(defservice cli-test-service
  TestService
  []
  (test-fn [this] :cli))

(defservice test-service-two
  TestServiceTwo
  []
  (test-fn-two [this] :two))
(defservice test-service-two-duplicate
  TestServiceTwo
  []
  (test-fn-two [this] :two))

(defservice test-service-three
  TestServiceThree
  []
  (test-fn-three [this] :three))