test-pack-1 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +37 -768
  3. data/lib/test_pack_1.rb +2 -30
  4. data/lib/test_pack_1/configuration.rb +5 -17
  5. data/lib/test_pack_1/controllers/simple_calculator_controller.rb +53 -0
  6. data/lib/test_pack_1/models/operation_type_enum.rb +23 -0
  7. data/lib/test_pack_1/test_pack1_client.rb +4 -34
  8. data/test/controllers/test_simple_calculator_controller.rb +33 -0
  9. metadata +6 -64
  10. data/lib/test_pack_1/controllers/alerts_controller.rb +0 -381
  11. data/lib/test_pack_1/controllers/assets_controller.rb +0 -227
  12. data/lib/test_pack_1/controllers/configuration_data_controller.rb +0 -76
  13. data/lib/test_pack_1/controllers/data_controller.rb +0 -349
  14. data/lib/test_pack_1/controllers/statuses_controller.rb +0 -215
  15. data/lib/test_pack_1/http/auth/custom_query_auth.rb +0 -16
  16. data/lib/test_pack_1/models/aggregate_mode_enum.rb +0 -23
  17. data/lib/test_pack_1/models/alert_item.rb +0 -104
  18. data/lib/test_pack_1/models/calculation_mode_enum.rb +0 -20
  19. data/lib/test_pack_1/models/client_configuration.rb +0 -62
  20. data/lib/test_pack_1/models/configuration_item.rb +0 -55
  21. data/lib/test_pack_1/models/data_item.rb +0 -92
  22. data/lib/test_pack_1/models/data_per_category_item.rb +0 -82
  23. data/lib/test_pack_1/models/data_per_category_response.rb +0 -63
  24. data/lib/test_pack_1/models/data_real_time_item.rb +0 -83
  25. data/lib/test_pack_1/models/data_signal.rb +0 -53
  26. data/lib/test_pack_1/models/data_signal_configuration.rb +0 -66
  27. data/lib/test_pack_1/models/data_signal_item.rb +0 -62
  28. data/lib/test_pack_1/models/device.rb +0 -208
  29. data/lib/test_pack_1/models/device_model.rb +0 -53
  30. data/lib/test_pack_1/models/metadata_field.rb +0 -44
  31. data/lib/test_pack_1/models/power_curve.rb +0 -60
  32. data/lib/test_pack_1/models/power_curve_value.rb +0 -44
  33. data/lib/test_pack_1/models/resolution_enum.rb +0 -41
  34. data/lib/test_pack_1/models/site.rb +0 -44
  35. data/lib/test_pack_1/models/site_with_data.rb +0 -78
  36. data/lib/test_pack_1/models/status_category_enum.rb +0 -26
  37. data/lib/test_pack_1/models/status_item.rb +0 -161
  38. data/lib/test_pack_1/models/time_zone_configuration.rb +0 -76
  39. data/lib/test_pack_1/models/turbine_type.rb +0 -89
  40. data/test/controllers/test_assets_controller.rb +0 -46
  41. data/test/controllers/test_configuration_data_controller.rb +0 -44
@@ -1,46 +0,0 @@
1
- # test_pack_1
2
- #
3
- # This file was automatically generated by APIMATIC v2.0 (
4
- # https://apimatic.io ).
5
-
6
- require_relative 'controller_test_base'
7
-
8
- class AssetsControllerTests < ControllerTestBase
9
- # Called only once for the class before any test has executed
10
- def self.startup
11
- self.controller = @@api_client.assets
12
- end
13
-
14
- # Gets a list of sites that the API key has permissions for. This request can also be made using the POST method, with a JSON request body instead of query parameters.
15
- def test_test_get_sites()
16
- # Parameters for the API call
17
- fields = nil
18
- page_size = 50
19
- page = 1
20
-
21
- # Perform the API call through the SDK function
22
- result = self.class.controller.get_sites(fields, page_size, page)
23
-
24
- # Test response code
25
- assert_equal(@response_catcher.response.status_code, 200)
26
-
27
- # Test headers
28
- expected_headers = {}
29
- expected_headers['content-type'] = 'application/json'
30
-
31
- assert(TestHelper.match_headers(expected_headers, @response_catcher.response.headers))
32
-
33
- # Test whether the captured response is as we expected
34
- assert_not_nil(result)
35
- expected_body = JSON.parse(
36
- '[{"siteId":1,"title":"Wind farm 1","country":"Sweden","identity":"SE-WF1",'\
37
- '"metadata":[{"key":"Address","value":"Wind Street 123"},{"key":"Phone","val'\
38
- 'ue":"555 123 456"}]},{"siteId":2,"title":"Solar site 1","country":"Spain","'\
39
- 'identity":"ES-SS1","metadata":[{"key":"Address","value":"Sun Street 456"},{'\
40
- '"key":"Phone","value":"555 456 789"}]}]'
41
- )
42
- received_body = JSON.parse(@response_catcher.response.raw_body)
43
- assert(TestHelper.match_body(expected_body, received_body))
44
- end
45
-
46
- end
@@ -1,44 +0,0 @@
1
- # test_pack_1
2
- #
3
- # This file was automatically generated by APIMATIC v2.0 (
4
- # https://apimatic.io ).
5
-
6
- require_relative 'controller_test_base'
7
-
8
- class ConfigurationDataControllerTests < ControllerTestBase
9
- # Called only once for the class before any test has executed
10
- def self.startup
11
- self.controller = @@api_client.configuration_data
12
- end
13
-
14
- # Gets your system-wide configuration data. This request can also be made using the POST method, with a JSON request body instead of query parameters.
15
- def test_test_get_configuration()
16
-
17
- # Perform the API call through the SDK function
18
- result = self.class.controller.get_configuration()
19
-
20
- # Test response code
21
- assert_equal(@response_catcher.response.status_code, 200)
22
-
23
- # Test headers
24
- expected_headers = {}
25
- expected_headers['content-type'] = 'application/json'
26
-
27
- assert(TestHelper.match_headers(expected_headers, @response_catcher.response.headers))
28
-
29
- # Test whether the captured response is as we expected
30
- assert_not_nil(result)
31
- expected_body = JSON.parse(
32
- '[{"client":{"title":"Intro (Greenbyte AB)","tag":"intro","urlWeb":"https:/'\
33
- '/intro.greenbyte.cloud/","urlApi":"https://intro.greenbyte.cloud/api/2.0/"}'\
34
- ',"timeZone":{"title":"Europe/Stockholm","utcOffset":1,"utcOffsetDst":2,"dst'\
35
- 'TimestampStart":"2020-03-29T01:00:00","dstTimestampEnd":"2020-10-25T01:00:0'\
36
- '0"},"dataSignals":{"availabilityTimeDataSignalId":430,"availabilityProducti'\
37
- 'onDataSignalId":445,"lostProductionDataSignalId":432,"performanceDataSignal'\
38
- 'Id":436}}]'
39
- )
40
- received_body = JSON.parse(@response_catcher.response.raw_body)
41
- assert(TestHelper.match_body(expected_body, received_body))
42
- end
43
-
44
- end