31f9a345
Isaac Lewis
init; some tests
|
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
RSpec.describe Syspro do
server_name = "dev3"
Rspec.describe PrimitiveClient do
base_url = "http://#{server_name}/SYSPROWCFService"
binding = "RESTHttp"
it "has a version number" do
expect(Syspro::VERSION).not_to be nil
end
it "does something useful" do
expect(false).to eq(true)
end
it "can be instantiated" do
expect {
sys = Syspro::PrimitiveClient.new(base_url, binding)
}.not_to raise_error
end
it "can login to a syspro database" do
sys = Syspro::PrimitiveClient.new(base_url, binding)
login_reply = sys.login(operator_name, password, company_id, company_password)
expect(login_reply).to eq(login_reply_example)
end
it "can logoff from a syspro database" do
sys = Syspro::PrimitiveClient.new(base_url, binding)
logoff_reply = sys.logoff(user_id)
expect(logoff_reply).to eq(logoff_reply_example)
end
Rspec.describe Query do
sys = Syspro::PrimitiveClient.new(base_url, binding)
it "can query browse" do
query_result = sys.query_browse(user_id, query_object)
expect(query_result).to eq(query_result_example)
end
it "can query fetch" do
query_result = sys.query_fetch(user_id, query_object)
expect(query_result).to eq(query_result_example)
end
it "can query query" do
query_result = sys.query_query(user_id, business_object, query_object)
expect(query_result).to eq(query_result_example)
end
end
Rspec.describe Setup do
sys = Syspro::PrimitiveClient.new(base_url, binding)
it "can add" do
setup_result = sys.setup_add(user_id, business_object, params, query_object)
expect(setup_result).to eq(setup_result_example)
end
it "can delete" do
setup_result = sys.setup_delete(user_id, business_object, params, query_object)
expect(setup_result).to eq(setup_result_example)
end
it "can update" do
setup_result = sys.setup_update(user_id, business_object, params, query_object)
expect(setup_result).to eq(setup_result_example)
end
end
Rspec.describe Transaction do
sys = Syspro::PrimitiveClient.new(base_url, binding)
it "can build" do
expect(sys.transaction_build(user_id, business_object, query_object)).to eq(transaction_result_example)
end
it "can post" do
expect(sys.transaction_post(user_id, business_object, query_object)).to eq(transaction_result_example)
end
end
Rspec.describe Asynchronous do
# TODO: Describe asynchronous versions of above methods
end
end # Primitive
Rpec.describe Client do
base_url = "http://#{server_name}/SYSPROWCFService"
binding = "RESTHttp"
Rspec.describe Utilities do
end
Rspec.describe Query do
end
Rspec.describe Setup do
end
Rspec.describe Transaction do
end
end # Client
end
|