summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md23
-rw-r--r--oso.yaml7
2 files changed, 30 insertions, 0 deletions
diff --git a/README.md b/README.md
index 0d5e25b..94615e3 100644
--- a/README.md
+++ b/README.md
@@ -154,10 +154,33 @@ This is very simple computation. Given the server can't assume the
list is ordered, it has to compare all list elements to the largest
one it has found so far.
+# Assumptions
+
+* The server will abort if the client doesn't use the request id from
+ the latest server message. That is, the client and server do not
+ need to handle multiple outstanding comparison requests.
+
+* The server does not need to handle the case of the client having an
+ empty list of integers, because there messages as given do no
+ indicate a way to signal a result of "no result".
+
+# Find max of a list of one
+
+This scenario verifies that the server finds the maximum integer in a
+list of one.
+
+~~~scenario
+given server
+when I run client with list consisting of 1
+then answer is 0
+~~~
+
---
title: "OSO work sample—MAX"
author: Lars Wirzenius
classes:
- json
+bindings:
+- oso.yaml
...
diff --git a/oso.yaml b/oso.yaml
new file mode 100644
index 0000000..de75d41
--- /dev/null
+++ b/oso.yaml
@@ -0,0 +1,7 @@
+- given: server
+ function: start_server
+ cleanup: stop_server
+- when: I run client with list consisting of {items:text}
+ function: setup_client
+- then: answer is {index}
+ function: answer_is