@situm/cordova 3.0.0

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 (313) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/CHANGELOG_UNRELEASED.md +28 -0
  3. package/Jenkinsfile +84 -0
  4. package/LICENSE +21 -0
  5. package/README.md +472 -0
  6. package/azure/common-steps.yaml +5 -0
  7. package/azure-pipelines.yml +336 -0
  8. package/docs/JSDoc/MapView.html +300 -0
  9. package/docs/JSDoc/MapViewControllerImpl.html +299 -0
  10. package/docs/JSDoc/Situm.html +5257 -0
  11. package/docs/JSDoc/android_Interfaces.js.html +825 -0
  12. package/docs/JSDoc/android_situm.js.html +380 -0
  13. package/docs/JSDoc/fonts/glyphicons-halflings-regular.eot +0 -0
  14. package/docs/JSDoc/fonts/glyphicons-halflings-regular.svg +288 -0
  15. package/docs/JSDoc/fonts/glyphicons-halflings-regular.ttf +0 -0
  16. package/docs/JSDoc/fonts/glyphicons-halflings-regular.woff +0 -0
  17. package/docs/JSDoc/fonts/glyphicons-halflings-regular.woff2 +0 -0
  18. package/docs/JSDoc/global.html +7538 -0
  19. package/docs/JSDoc/img/toast-ui.png +0 -0
  20. package/docs/JSDoc/index.html +90 -0
  21. package/docs/JSDoc/map-view-controller.js.html +307 -0
  22. package/docs/JSDoc/map-view.js.html +172 -0
  23. package/docs/JSDoc/scripts/jquery.min.js +2 -0
  24. package/docs/JSDoc/scripts/linenumber.js +30 -0
  25. package/docs/JSDoc/scripts/prettify/Apache-License-2.0.txt +202 -0
  26. package/docs/JSDoc/scripts/prettify/lang-css.js +2 -0
  27. package/docs/JSDoc/scripts/prettify/prettify.js +28 -0
  28. package/docs/JSDoc/scripts/tui-doc.js +200 -0
  29. package/docs/JSDoc/styles/bootstrap.min.css +6 -0
  30. package/docs/JSDoc/styles/custom.css +23 -0
  31. package/docs/JSDoc/styles/prettify-jsdoc.css +111 -0
  32. package/docs/JSDoc/styles/prettify-tomorrow.css +132 -0
  33. package/docs/JSDoc/styles/tui-doc.css +485 -0
  34. package/docs/conf.json +28 -0
  35. package/docs/getting-started.md +298 -0
  36. package/docs/imagotype-SITUM-transparent-90.png +0 -0
  37. package/docs/static/styles/custom.css +23 -0
  38. package/package.json +60 -0
  39. package/plugin.xml +102 -0
  40. package/scripts/update_changelog.sh +22 -0
  41. package/src/android/app/build.gradle +51 -0
  42. package/src/android/app/proguard-rules.pro +21 -0
  43. package/src/android/app/src/main/AndroidManifest.xml +11 -0
  44. package/src/android/app/src/main/java/es/situm/plugin/DateUtils.java +15 -0
  45. package/src/android/app/src/main/java/es/situm/plugin/PluginHelper.java +919 -0
  46. package/src/android/app/src/main/java/es/situm/plugin/SitumMapper.java +968 -0
  47. package/src/android/app/src/main/java/es/situm/plugin/SitumPlugin.java +109 -0
  48. package/src/android/app/src/main/res/drawable/ic_launcher_background.xml +170 -0
  49. package/src/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml +34 -0
  50. package/src/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +5 -0
  51. package/src/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +5 -0
  52. package/src/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  53. package/src/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  54. package/src/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  55. package/src/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  56. package/src/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  57. package/src/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  58. package/src/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  59. package/src/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  60. package/src/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  61. package/src/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  62. package/src/android/app/src/main/res/values/colors.xml +6 -0
  63. package/src/android/app/src/main/res/values/strings.xml +3 -0
  64. package/src/android/app/src/main/res/values/styles.xml +11 -0
  65. package/src/android/app/src/test/java/es/situm/plugin/PluginHelperTest.java +27 -0
  66. package/src/android/app/src/test/java/es/situm/plugin/SitumMapperTest.java +1485 -0
  67. package/src/android/app/src/test/java/es/situm/plugin/angle/AngleCreator.java +46 -0
  68. package/src/android/app/src/test/java/es/situm/plugin/bounds/BoundsCreator.java +50 -0
  69. package/src/android/app/src/test/java/es/situm/plugin/building/BuildingCreator.java +76 -0
  70. package/src/android/app/src/test/java/es/situm/plugin/cartesianCoordinate/CartesianCoordinateCreator.java +31 -0
  71. package/src/android/app/src/test/java/es/situm/plugin/circle/CircleCreator.java +41 -0
  72. package/src/android/app/src/test/java/es/situm/plugin/coordinate/CoordinateCreator.java +32 -0
  73. package/src/android/app/src/test/java/es/situm/plugin/dimensions/DimensionsCreator.java +31 -0
  74. package/src/android/app/src/test/java/es/situm/plugin/directionsRequest/DirectionsRequestCreator.java +105 -0
  75. package/src/android/app/src/test/java/es/situm/plugin/event/EventCreator.java +108 -0
  76. package/src/android/app/src/test/java/es/situm/plugin/floor/FloorCreator.java +58 -0
  77. package/src/android/app/src/test/java/es/situm/plugin/indication/IndicationCreator.java +40 -0
  78. package/src/android/app/src/test/java/es/situm/plugin/location/LocationCreator.java +197 -0
  79. package/src/android/app/src/test/java/es/situm/plugin/locationRequest/LocationRequestCreator.java +45 -0
  80. package/src/android/app/src/test/java/es/situm/plugin/locationStatus/LocationStatusCreator.java +211 -0
  81. package/src/android/app/src/test/java/es/situm/plugin/navigationProgress/NavigationProgressCreator.java +154 -0
  82. package/src/android/app/src/test/java/es/situm/plugin/poi/PoiCreator.java +126 -0
  83. package/src/android/app/src/test/java/es/situm/plugin/poiCategory/PoiCategoryCreator.java +38 -0
  84. package/src/android/app/src/test/java/es/situm/plugin/point/PointCreator.java +200 -0
  85. package/src/android/app/src/test/java/es/situm/plugin/route/RouteCreator.java +142 -0
  86. package/src/android/app/src/test/java/es/situm/plugin/routeStep/RouteStepCreator.java +173 -0
  87. package/src/android/app/src/test/java/es/situm/plugin/situmConversionArea/SitumConversionAreaCreator.java +35 -0
  88. package/src/android/build.gradle +31 -0
  89. package/src/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  90. package/src/android/gradle/wrapper/gradle-wrapper.properties +6 -0
  91. package/src/android/gradle.properties +16 -0
  92. package/src/android/gradlew +172 -0
  93. package/src/android/gradlew.bat +84 -0
  94. package/src/android/settings.gradle +3 -0
  95. package/src/android/situm.gradle +19 -0
  96. package/src/ios/Classes/Private/CDVDebug.h +25 -0
  97. package/src/ios/Classes/Private/CDVJSON_private.h +31 -0
  98. package/src/ios/Classes/Private/CDVJSON_private.m +99 -0
  99. package/src/ios/Classes/Private/CDVPlugin+Private.h +24 -0
  100. package/src/ios/Classes/Private/CDVPlugins/CDVGestureHandler/CDVGestureHandler.h +26 -0
  101. package/src/ios/Classes/Private/CDVPlugins/CDVGestureHandler/CDVGestureHandler.m +70 -0
  102. package/src/ios/Classes/Private/CDVPlugins/CDVHandleOpenURL/CDVHandleOpenURL.h +27 -0
  103. package/src/ios/Classes/Private/CDVPlugins/CDVHandleOpenURL/CDVHandleOpenURL.m +86 -0
  104. package/src/ios/Classes/Private/CDVPlugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.h +34 -0
  105. package/src/ios/Classes/Private/CDVPlugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.m +153 -0
  106. package/src/ios/Classes/Private/CDVPlugins/CDVLocalStorage/CDVLocalStorage.h +50 -0
  107. package/src/ios/Classes/Private/CDVPlugins/CDVLocalStorage/CDVLocalStorage.m +487 -0
  108. package/src/ios/Classes/Private/CDVPlugins/CDVLogger/CDVLogger.h +26 -0
  109. package/src/ios/Classes/Private/CDVPlugins/CDVLogger/CDVLogger.m +37 -0
  110. package/src/ios/Classes/Private/CDVPlugins/CDVUIWebViewEngine/CDVUIWebViewDelegate.h +41 -0
  111. package/src/ios/Classes/Private/CDVPlugins/CDVUIWebViewEngine/CDVUIWebViewDelegate.m +399 -0
  112. package/src/ios/Classes/Private/CDVPlugins/CDVUIWebViewEngine/CDVUIWebViewEngine.h +27 -0
  113. package/src/ios/Classes/Private/CDVPlugins/CDVUIWebViewEngine/CDVUIWebViewEngine.m +202 -0
  114. package/src/ios/Classes/Private/CDVPlugins/CDVUIWebViewEngine/CDVUIWebViewNavigationDelegate.h +29 -0
  115. package/src/ios/Classes/Private/CDVPlugins/CDVUIWebViewEngine/CDVUIWebViewNavigationDelegate.m +153 -0
  116. package/src/ios/Classes/Public/CDV.h +32 -0
  117. package/src/ios/Classes/Public/CDVAppDelegate.h +28 -0
  118. package/src/ios/Classes/Public/CDVAppDelegate.m +118 -0
  119. package/src/ios/Classes/Public/CDVAvailability.h +111 -0
  120. package/src/ios/Classes/Public/CDVAvailabilityDeprecated.h +26 -0
  121. package/src/ios/Classes/Public/CDVCommandDelegate.h +51 -0
  122. package/src/ios/Classes/Public/CDVCommandDelegateImpl.h +36 -0
  123. package/src/ios/Classes/Public/CDVCommandDelegateImpl.m +186 -0
  124. package/src/ios/Classes/Public/CDVCommandQueue.h +39 -0
  125. package/src/ios/Classes/Public/CDVCommandQueue.m +194 -0
  126. package/src/ios/Classes/Public/CDVConfigParser.h +30 -0
  127. package/src/ios/Classes/Public/CDVConfigParser.m +81 -0
  128. package/src/ios/Classes/Public/CDVInvokedUrlCommand.h +52 -0
  129. package/src/ios/Classes/Public/CDVInvokedUrlCommand.m +116 -0
  130. package/src/ios/Classes/Public/CDVPlugin+Resources.h +39 -0
  131. package/src/ios/Classes/Public/CDVPlugin+Resources.m +38 -0
  132. package/src/ios/Classes/Public/CDVPlugin.h +85 -0
  133. package/src/ios/Classes/Public/CDVPlugin.m +202 -0
  134. package/src/ios/Classes/Public/CDVPluginResult.h +66 -0
  135. package/src/ios/Classes/Public/CDVPluginResult.m +186 -0
  136. package/src/ios/Classes/Public/CDVScreenOrientationDelegate.h +33 -0
  137. package/src/ios/Classes/Public/CDVTimer.h +27 -0
  138. package/src/ios/Classes/Public/CDVTimer.m +123 -0
  139. package/src/ios/Classes/Public/CDVURLProtocol.h +27 -0
  140. package/src/ios/Classes/Public/CDVURLProtocol.m +113 -0
  141. package/src/ios/Classes/Public/CDVUserAgentUtil.h +27 -0
  142. package/src/ios/Classes/Public/CDVUserAgentUtil.m +124 -0
  143. package/src/ios/Classes/Public/CDVViewController.h +92 -0
  144. package/src/ios/Classes/Public/CDVViewController.m +821 -0
  145. package/src/ios/Classes/Public/CDVWebViewEngineProtocol.h +42 -0
  146. package/src/ios/Classes/Public/CDVWhitelist.h +34 -0
  147. package/src/ios/Classes/Public/CDVWhitelist.m +285 -0
  148. package/src/ios/Classes/Public/NSDictionary+CordovaPreferences.h +35 -0
  149. package/src/ios/Classes/Public/NSDictionary+CordovaPreferences.m +63 -0
  150. package/src/ios/Classes/Public/NSMutableArray+QueueAdditions.h +29 -0
  151. package/src/ios/Classes/Public/NSMutableArray+QueueAdditions.m +58 -0
  152. package/src/ios/Cordova/Cordova.h +51 -0
  153. package/src/ios/Cordova/Info.plist +24 -0
  154. package/src/ios/Podfile +5 -0
  155. package/src/ios/SitumCordovaPlugin.xcodeproj/project.pbxproj +1324 -0
  156. package/src/ios/SitumCordovaPlugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  157. package/src/ios/SitumCordovaPlugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  158. package/src/ios/SitumCordovaPlugin.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
  159. package/src/ios/SitumCordovaPlugin.xcodeproj/xcshareddata/xcschemes/CordovaLib.xcscheme +100 -0
  160. package/src/ios/SitumCordovaPlugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  161. package/src/ios/SitumCordovaPlugin_Prefix.pch +22 -0
  162. package/src/ios/VERSION +1 -0
  163. package/src/ios/cordova.js +2432 -0
  164. package/src/ios/situmcordovaplugin/AppDelegate.h +22 -0
  165. package/src/ios/situmcordovaplugin/AppDelegate.m +98 -0
  166. package/src/ios/situmcordovaplugin/Assets.xcassets/AppIcon.appiconset/Contents.json +98 -0
  167. package/src/ios/situmcordovaplugin/Base.lproj/LaunchScreen.storyboard +25 -0
  168. package/src/ios/situmcordovaplugin/Base.lproj/Main.storyboard +24 -0
  169. package/src/ios/situmcordovaplugin/Constants.h +14 -0
  170. package/src/ios/situmcordovaplugin/Constants.m +14 -0
  171. package/src/ios/situmcordovaplugin/Info.plist +45 -0
  172. package/src/ios/situmcordovaplugin/SITUtils.h +7 -0
  173. package/src/ios/situmcordovaplugin/SITUtils.m +13 -0
  174. package/src/ios/situmcordovaplugin/SitumLocationWrapper.h +109 -0
  175. package/src/ios/situmcordovaplugin/SitumLocationWrapper.m +983 -0
  176. package/src/ios/situmcordovaplugin/SitumPlugin.h +41 -0
  177. package/src/ios/situmcordovaplugin/SitumPlugin.m +752 -0
  178. package/src/ios/situmcordovaplugin/ViewController.h +15 -0
  179. package/src/ios/situmcordovaplugin/ViewController.m +29 -0
  180. package/src/ios/situmcordovaplugin/main.m +16 -0
  181. package/src/ios/situmcordovaplugin/situmcordovaplugin.xcdatamodeld/.xccurrentversion +8 -0
  182. package/src/ios/situmcordovaplugin/situmcordovaplugin.xcdatamodeld/situmcordovaplugin.xcdatamodel/contents +4 -0
  183. package/src/ios/situmcordovaplugintests/AngleTests.m +53 -0
  184. package/src/ios/situmcordovaplugintests/BoundTests.m +51 -0
  185. package/src/ios/situmcordovaplugintests/BuildingTests.m +41 -0
  186. package/src/ios/situmcordovaplugintests/CartesianCoordinateTests.m +42 -0
  187. package/src/ios/situmcordovaplugintests/ConversionAreaTests.m +43 -0
  188. package/src/ios/situmcordovaplugintests/CoordinateTests.m +42 -0
  189. package/src/ios/situmcordovaplugintests/DimensionTests.m +43 -0
  190. package/src/ios/situmcordovaplugintests/EventTests.m +42 -0
  191. package/src/ios/situmcordovaplugintests/FloorTests.m +52 -0
  192. package/src/ios/situmcordovaplugintests/Info.plist +38 -0
  193. package/src/ios/situmcordovaplugintests/InputTests/DirectionsRequestTest.m +108 -0
  194. package/src/ios/situmcordovaplugintests/InputTests/InputCartesianCoordinateTests.m +45 -0
  195. package/src/ios/situmcordovaplugintests/InputTests/InputCoordinateTests.m +45 -0
  196. package/src/ios/situmcordovaplugintests/InputTests/InputFloorTests.m +59 -0
  197. package/src/ios/situmcordovaplugintests/InputTests/InputIndicationTests.m +45 -0
  198. package/src/ios/situmcordovaplugintests/InputTests/InputLocationTests.m +163 -0
  199. package/src/ios/situmcordovaplugintests/InputTests/InputPoiCategoryTests.m +46 -0
  200. package/src/ios/situmcordovaplugintests/InputTests/InputPointTests.m +137 -0
  201. package/src/ios/situmcordovaplugintests/InputTests/LocationRequestTest.m +79 -0
  202. package/src/ios/situmcordovaplugintests/LocationStatusTests.m +60 -0
  203. package/src/ios/situmcordovaplugintests/LocationTests.m +114 -0
  204. package/src/ios/situmcordovaplugintests/NavigationProgressTests.m +50 -0
  205. package/src/ios/situmcordovaplugintests/PoiCategoryIconTests.m +43 -0
  206. package/src/ios/situmcordovaplugintests/PoiCategoryTests.m +42 -0
  207. package/src/ios/situmcordovaplugintests/PoiTests.m +83 -0
  208. package/src/ios/situmcordovaplugintests/PointTests.m +107 -0
  209. package/src/ios/situmcordovaplugintests/RouteStepTests.m +78 -0
  210. package/src/ios/situmcordovaplugintests/RouteTests.m +42 -0
  211. package/src/ios/situmcordovaplugintests/SitumCreatorTests.h +91 -0
  212. package/src/ios/situmcordovaplugintests/SitumCreatorTests.m +928 -0
  213. package/src/ios/situmcordovaplugintests/TestingHelper.h +48 -0
  214. package/src/ios/situmcordovaplugintests/TestingHelper.m +342 -0
  215. package/src/ios/situmcordovaplugintests/indicationTests.m +43 -0
  216. package/tests/common-resources/angle/angle1.json +6 -0
  217. package/tests/common-resources/angle/angle2.json +6 -0
  218. package/tests/common-resources/bounds/bounds1.json +18 -0
  219. package/tests/common-resources/bounds/bounds2.json +18 -0
  220. package/tests/common-resources/building/building1.json +64 -0
  221. package/tests/common-resources/cartesianCoordinate/cartesianCoordinate1.json +4 -0
  222. package/tests/common-resources/circle/circle1.json +17 -0
  223. package/tests/common-resources/coordinate/coordinate1.json +4 -0
  224. package/tests/common-resources/dimensions/dimensions1.json +4 -0
  225. package/tests/common-resources/directionsRequest/directionsRequest1.json +166 -0
  226. package/tests/common-resources/directionsRequest/directionsRequest2.json +167 -0
  227. package/tests/common-resources/directionsRequest/directionsRequest3.json +166 -0
  228. package/tests/common-resources/directionsRequest/directionsRequest4.json +166 -0
  229. package/tests/common-resources/directionsRequest/directionsRequest5.json +167 -0
  230. package/tests/common-resources/directionsRequest/directionsRequest6.json +153 -0
  231. package/tests/common-resources/events/event1.json +66 -0
  232. package/tests/common-resources/floor/floor1.json +13 -0
  233. package/tests/common-resources/floor/floor2.json +13 -0
  234. package/tests/common-resources/indication/indication1.json +10 -0
  235. package/tests/common-resources/location/location1.json +48 -0
  236. package/tests/common-resources/location/location10.json +48 -0
  237. package/tests/common-resources/location/location2.json +48 -0
  238. package/tests/common-resources/location/location3.json +48 -0
  239. package/tests/common-resources/location/location4.json +48 -0
  240. package/tests/common-resources/location/location5.json +48 -0
  241. package/tests/common-resources/location/location6.json +48 -0
  242. package/tests/common-resources/location/location7.json +48 -0
  243. package/tests/common-resources/location/location8.json +48 -0
  244. package/tests/common-resources/location/location9.json +48 -0
  245. package/tests/common-resources/locationRequest/locationRequest1.json +6 -0
  246. package/tests/common-resources/locationRequest/locationRequest2.json +32 -0
  247. package/tests/common-resources/locationRequest/locationRequest3.json +33 -0
  248. package/tests/common-resources/locationRequest/locationRequest4.json +31 -0
  249. package/tests/common-resources/locationStatus/locationStatus1.json +4 -0
  250. package/tests/common-resources/locationStatus/locationStatus10.json +4 -0
  251. package/tests/common-resources/locationStatus/locationStatus11.json +4 -0
  252. package/tests/common-resources/locationStatus/locationStatus12.json +4 -0
  253. package/tests/common-resources/locationStatus/locationStatus13.json +4 -0
  254. package/tests/common-resources/locationStatus/locationStatus2.json +4 -0
  255. package/tests/common-resources/locationStatus/locationStatus3.json +4 -0
  256. package/tests/common-resources/locationStatus/locationStatus4.json +4 -0
  257. package/tests/common-resources/locationStatus/locationStatus5.json +4 -0
  258. package/tests/common-resources/locationStatus/locationStatus6.json +4 -0
  259. package/tests/common-resources/locationStatus/locationStatus7.json +4 -0
  260. package/tests/common-resources/locationStatus/locationStatus8.json +4 -0
  261. package/tests/common-resources/locationStatus/locationStatus9.json +4 -0
  262. package/tests/common-resources/navigationProgress/navigationProgress1.json +77 -0
  263. package/tests/common-resources/navigationProgress/navigationProgress2.json +77 -0
  264. package/tests/common-resources/poi/poi1.json +35 -0
  265. package/tests/common-resources/poi/poi2.json +35 -0
  266. package/tests/common-resources/poi/poi3.json +35 -0
  267. package/tests/common-resources/poi/poi4.json +38 -0
  268. package/tests/common-resources/poi/poi5.json +35 -0
  269. package/tests/common-resources/poiCategory/poiCategory1.json +7 -0
  270. package/tests/common-resources/poiCategoryIcon/poiCategoryIcon1.json +1 -0
  271. package/tests/common-resources/poiCategoryIcon/poiCategoryIcon1.png +0 -0
  272. package/tests/common-resources/point/point1.json +14 -0
  273. package/tests/common-resources/point/point2.json +14 -0
  274. package/tests/common-resources/point/point3.json +14 -0
  275. package/tests/common-resources/point/point4.json +14 -0
  276. package/tests/common-resources/point/point5.json +14 -0
  277. package/tests/common-resources/point/point6.json +14 -0
  278. package/tests/common-resources/point/point7.json +14 -0
  279. package/tests/common-resources/point/point8.json +14 -0
  280. package/tests/common-resources/route/route1.json +530 -0
  281. package/tests/common-resources/routeStep/routeStep1.json +35 -0
  282. package/tests/common-resources/routeStep/routeStep2.json +35 -0
  283. package/tests/common-resources/routeStep/routeStep3.json +35 -0
  284. package/tests/common-resources/routeStep/routeStep4.json +35 -0
  285. package/tests/common-resources/routeStep/routeStep5.json +35 -0
  286. package/tests/common-resources/situmConversionArea/situmConversionArea1.json +19 -0
  287. package/tests/js/resources/fetchBuildings.json +176 -0
  288. package/tests/js/resources/fetchEventsFromBuilding.json +201 -0
  289. package/tests/js/resources/fetchFloorsFromBuilding.json +34 -0
  290. package/tests/js/resources/fetchIndoorPOIsFromBuilding.json +574 -0
  291. package/tests/js/resources/fetchMapFromFloor.json +3 -0
  292. package/tests/js/resources/fetchOutdoorPOIsFromBuilding.json +68 -0
  293. package/tests/js/resources/fetchPoiCategories.json +72 -0
  294. package/tests/js/resources/fetchPoiCategoryIconNormal.json +3 -0
  295. package/tests/js/resources/fetchPoiCategoryIconSelected.json +3 -0
  296. package/tests/js/resources/requestDirections.json +1167 -0
  297. package/tests/js/resources/startPositioning/0_starting.json +4 -0
  298. package/tests/js/resources/startPositioning/1_preparingPositioningModel.json +4 -0
  299. package/tests/js/resources/startPositioning/2_startingPositioning.json +4 -0
  300. package/tests/js/resources/startPositioning/3_calculating.json +4 -0
  301. package/tests/js/resources/startPositioning/4_position.json +48 -0
  302. package/tests/js/resources/startPositioning/5_position.json +48 -0
  303. package/tests/js/test.js +416 -0
  304. package/tests/scripts/clean_android_resources.sh +3 -0
  305. package/tests/scripts/clean_ios_resources.sh +3 -0
  306. package/tests/scripts/copy_android_resources.sh +3 -0
  307. package/tests/scripts/copy_ios_resources.sh +3 -0
  308. package/tests/scripts/self-destruct.sh +1 -0
  309. package/www/android/Interfaces.js +742 -0
  310. package/www/android/situm.js +296 -0
  311. package/www/ios/situm.js +99 -0
  312. package/www/map-view-controller.js +223 -0
  313. package/www/map-view.js +88 -0
@@ -0,0 +1,114 @@
1
+ //
2
+ // LocationTests.m
3
+ // situmcordovaplugintests
4
+ //
5
+ // Created by Cristina Sánchez Barreiro on 13/09/2018.
6
+ //
7
+
8
+ #import <XCTest/XCTest.h>
9
+ #import "SitumCreatorTests.h"
10
+ #import "SitumLocationWrapper.h"
11
+ #import "TestingHelper.h"
12
+
13
+ @interface LocationTests : XCTestCase
14
+
15
+ @property (nonatomic, strong) NSString *filePath;
16
+ @property (nonatomic, strong) TestingHelper *helper;
17
+
18
+ @end
19
+
20
+ @implementation LocationTests
21
+
22
+ - (void)setUp {
23
+ [super setUp];
24
+ _filePath = @"resources/location";
25
+ _helper = [TestingHelper new];
26
+ }
27
+
28
+ - (void)tearDown {
29
+ // Put teardown code here. This method is called after the invocation of each test method in the class.
30
+ [super tearDown];
31
+ }
32
+
33
+ - (void)testLocation1 {
34
+ SITLocation *location1 = [SitumCreatorTests createLocationWithBuildingFloorAndCartesianCoordinates];
35
+ NSDictionary *locationJO1 = [SitumLocationWrapper.shared locationToJsonObject:location1];
36
+ NSString *fileName1 = @"location1";
37
+ //read from json object in resources
38
+ NSDictionary *jsonLocation1 = [TestingHelper dataFromJSONFileNamed: fileName1 inDirectory : _filePath];
39
+ [_helper assertLocation: jsonLocation1: locationJO1];
40
+ }
41
+
42
+ - (void) testLocation2 {
43
+ SITLocation *location2 = [SitumCreatorTests createLocationWithCoordinate];
44
+ NSDictionary *locationJO2 = [SitumLocationWrapper.shared locationToJsonObject:location2];
45
+ NSString *fileName2 = @"location2";
46
+ NSDictionary *jsonLocation2 = [TestingHelper dataFromJSONFileNamed: fileName2 inDirectory : _filePath];
47
+ [_helper assertLocation: jsonLocation2: locationJO2];
48
+ }
49
+
50
+ - (void) testLocation3 {
51
+ SITLocation *location3 = [SitumCreatorTests createLocationWithBuildingAndCoordinate];
52
+ NSDictionary *locationJO3 = [SitumLocationWrapper.shared locationToJsonObject:location3];
53
+ NSString *fileName3 = @"location3";
54
+ NSDictionary *jsonLocation3 = [TestingHelper dataFromJSONFileNamed: fileName3 inDirectory : _filePath];
55
+ [_helper assertLocation: jsonLocation3: locationJO3];
56
+ }
57
+
58
+ - (void) testLocation4 {
59
+ SITLocation *location4 = [SitumCreatorTests locationWithCartesianBearing];
60
+ NSDictionary *locationJO4 = [SitumLocationWrapper.shared locationToJsonObject:location4];
61
+ NSString *fileName4 = @"location4";
62
+ NSDictionary *jsonLocation4 = [TestingHelper dataFromJSONFileNamed: fileName4 inDirectory : _filePath];
63
+ [_helper assertLocation: jsonLocation4: locationJO4];
64
+ }
65
+
66
+ - (void) testLocation5 {
67
+ SITLocation *location5 = [SitumCreatorTests locationWithoutCartesianBearing];
68
+ NSDictionary *locationJO5 = [SitumLocationWrapper.shared locationToJsonObject:location5];
69
+ NSString *fileName5 = @"location5";
70
+ NSDictionary *jsonLocation5 = [TestingHelper dataFromJSONFileNamed: fileName5 inDirectory : _filePath];
71
+ [_helper assertLocation: jsonLocation5: locationJO5];
72
+ }
73
+
74
+ - (void) testLocation6 {
75
+ SITLocation *location6 = [SitumCreatorTests locationWithBearing];
76
+ NSDictionary *locationJO6 = [SitumLocationWrapper.shared locationToJsonObject:location6];
77
+ NSString *fileName6 = @"location6";
78
+ NSDictionary *jsonLocation6 = [TestingHelper dataFromJSONFileNamed: fileName6 inDirectory : _filePath];
79
+ [_helper assertLocation: jsonLocation6: locationJO6];
80
+ }
81
+
82
+ - (void) testLocation7 {
83
+ SITLocation *location7 = [SitumCreatorTests locationWithouthBearing];
84
+ NSDictionary *locationJO7 = [SitumLocationWrapper.shared locationToJsonObject:location7];
85
+ NSString *fileName7 = @"location7";
86
+ NSDictionary *jsonLocation7 = [TestingHelper dataFromJSONFileNamed: fileName7 inDirectory : _filePath];
87
+ [_helper assertLocation: jsonLocation7: locationJO7];
88
+ }
89
+
90
+ - (void) testLocation8 {
91
+ SITLocation *location8 = [SitumCreatorTests indoorLocationWithIndoorBearingQualityLow];
92
+ NSDictionary *locationJO8 = [SitumLocationWrapper.shared locationToJsonObject:location8];
93
+ NSString *fileName8 = @"location8";
94
+ NSDictionary *jsonLocation8 = [TestingHelper dataFromJSONFileNamed: fileName8 inDirectory : _filePath];
95
+ [_helper assertLocation: jsonLocation8: locationJO8];
96
+ }
97
+
98
+ - (void) testLocation9 {
99
+ SITLocation *location9 = [SitumCreatorTests indoorLocationWithIndoorBearingQualityHigh];
100
+ NSDictionary *locationJO9 = [SitumLocationWrapper.shared locationToJsonObject:location9];
101
+ NSString *fileName9 = @"location9";
102
+ NSDictionary *jsonLocation9 = [TestingHelper dataFromJSONFileNamed: fileName9 inDirectory : _filePath];
103
+ [_helper assertLocation: jsonLocation9: locationJO9];
104
+ }
105
+
106
+ - (void) testLocation10 {
107
+ SITLocation *location10 = [SitumCreatorTests outdoorLocation];
108
+ NSDictionary *locationJO10 = [SitumLocationWrapper.shared locationToJsonObject:location10];
109
+ NSString *fileName10 = @"location10";
110
+ NSDictionary *jsonLocation10 = [TestingHelper dataFromJSONFileNamed: fileName10 inDirectory : _filePath];
111
+ [_helper assertLocation: jsonLocation10: locationJO10];
112
+ }
113
+
114
+ @end
@@ -0,0 +1,50 @@
1
+ //
2
+ // NavigationProgressTests.m
3
+ // situmcordovaplugintests
4
+ //
5
+ // Created by Cristina Sánchez Barreiro on 13/09/2018.
6
+ //
7
+
8
+ #import <XCTest/XCTest.h>
9
+ #import "SitumCreatorTests.h"
10
+ #import "SitumLocationWrapper.h"
11
+ #import "TestingHelper.h"
12
+
13
+ @interface NavigationProgressTests : XCTestCase
14
+
15
+ @property (nonatomic, strong) NSString *filePath;
16
+ @property (nonatomic, strong) TestingHelper *helper;
17
+
18
+ @end
19
+
20
+ @implementation NavigationProgressTests
21
+
22
+ - (void)setUp {
23
+ [super setUp];
24
+ _filePath = @"resources/navigationProgress";
25
+ _helper = [TestingHelper new];
26
+ }
27
+ - (void)tearDown {
28
+ // Put teardown code here. This method is called after the invocation of each test method in the class.
29
+ [super tearDown];
30
+ }
31
+
32
+ - (void) testNavigationProgress1 {
33
+ SITNavigationProgress *navigationProgress1 = [SitumCreatorTests createNavigationProgressOutdoor];
34
+ NSDictionary *navigationProgressJO1 = [SitumLocationWrapper.shared navigationProgressToJsonObject:navigationProgress1];
35
+ NSString *fileName1 = @"navigationProgress1";
36
+ //read from json object in resources
37
+ NSDictionary *jsonNavigationProgress1 = [TestingHelper dataFromJSONFileNamed: fileName1 inDirectory : _filePath];
38
+ [_helper assertNavigationProgress: jsonNavigationProgress1: navigationProgressJO1];
39
+ }
40
+
41
+ - (void) testNavigationProgress2 {
42
+ SITNavigationProgress *navigationProgress2 = [SitumCreatorTests createNavigationProgressIndoor];
43
+ NSDictionary *navigationProgressJO2 = [SitumLocationWrapper.shared navigationProgressToJsonObject:navigationProgress2];
44
+ NSString *fileName2 = @"navigationProgress2";
45
+ //read from json object in resources
46
+ NSDictionary *jsonNavigationProgress2 = [TestingHelper dataFromJSONFileNamed: fileName2 inDirectory : _filePath];
47
+ [_helper assertNavigationProgress: jsonNavigationProgress2: navigationProgressJO2];
48
+ }
49
+
50
+ @end
@@ -0,0 +1,43 @@
1
+ //
2
+ // PoiCategoryIconTests.m
3
+ // situmcordovaplugintests
4
+ //
5
+ // Created by Cristina Sánchez Barreiro on 17/09/2018.
6
+ //
7
+
8
+ #import <XCTest/XCTest.h>
9
+ #import "SitumCreatorTests.h"
10
+ #import "SitumLocationWrapper.h"
11
+ #import "TestingHelper.h"
12
+
13
+ @interface PoiCategoryIconTests : XCTestCase
14
+
15
+ @property (nonatomic, strong) NSString *filePath;
16
+ @property (nonatomic, strong) TestingHelper *helper;
17
+
18
+ @end
19
+
20
+
21
+ @implementation PoiCategoryIconTests
22
+
23
+ - (void)setUp {
24
+ [super setUp];
25
+ _filePath = @"resources/poiCategoryIcon";
26
+ _helper = [TestingHelper new];
27
+ }
28
+
29
+ - (void)tearDown {
30
+ // Put teardown code here. This method is called after the invocation of each test method in the class.
31
+ [super tearDown];
32
+ }
33
+ - (void) testPoiCategoryIcon {
34
+ UIImage *image = [SitumCreatorTests createPoiCategoryIcon];
35
+
36
+ NSDictionary *imageJO = [SitumLocationWrapper.shared bitmapToJsonObject:image];
37
+ NSString *fileName = @"poiCategoryIcon1";
38
+ //read from json object in resources
39
+ NSDictionary *jsonImage = [TestingHelper dataFromJSONFileNamed: fileName inDirectory : _filePath];
40
+ [_helper assertImage: jsonImage: imageJO];
41
+ }
42
+
43
+ @end
@@ -0,0 +1,42 @@
1
+ //
2
+ // PoiCategoryTests.m
3
+ // situmcordovaplugintests
4
+ //
5
+ // Created by Cristina Sánchez Barreiro on 13/09/2018.
6
+ //
7
+
8
+ #import <XCTest/XCTest.h>
9
+ #import "SitumCreatorTests.h"
10
+ #import "SitumLocationWrapper.h"
11
+ #import "TestingHelper.h"
12
+
13
+ @interface PoiCategoryTests : XCTestCase
14
+
15
+ @property (nonatomic, strong) NSString *filePath;
16
+ @property (nonatomic, strong) TestingHelper *helper;
17
+
18
+ @end
19
+
20
+ @implementation PoiCategoryTests
21
+
22
+ - (void)setUp {
23
+ [super setUp];
24
+ _filePath = @"resources/poiCategory";
25
+ _helper = [TestingHelper new];
26
+ }
27
+
28
+ - (void)tearDown {
29
+ // Put teardown code here. This method is called after the invocation of each test method in the class.
30
+ [super tearDown];
31
+ }
32
+
33
+ - (void) testPoiCategory {
34
+ // ### POICATEGORY1.JSON ###
35
+ SITPOICategory *poiCategory1 = [SitumCreatorTests createPoiCategory];
36
+ NSDictionary *poiCategoryJO1 = [SitumLocationWrapper.shared poiCategoryToJsonObject:poiCategory1];
37
+ NSString *fileName1 = @"poiCategory1";
38
+ //read from json object in resources
39
+ NSDictionary *jsonPoiCategory1 = [TestingHelper dataFromJSONFileNamed: fileName1 inDirectory : _filePath];
40
+ [_helper assertPoint: jsonPoiCategory1: poiCategoryJO1];
41
+ }
42
+ @end
@@ -0,0 +1,83 @@
1
+ //
2
+ // PoiTests.m
3
+ // situmcordovaplugintests
4
+ //
5
+ // Created by Cristina Sánchez Barreiro on 14/09/2018.
6
+ //
7
+
8
+ #import <XCTest/XCTest.h>
9
+ #import "SitumCreatorTests.h"
10
+ #import "SitumLocationWrapper.h"
11
+ #import "TestingHelper.h"
12
+
13
+ @interface PoiTests : XCTestCase
14
+
15
+ @property (nonatomic, strong) NSString *filePath;
16
+ @property (nonatomic, strong) TestingHelper *helper;
17
+
18
+ @end
19
+
20
+ @implementation PoiTests
21
+
22
+ - (void)setUp {
23
+ [super setUp];
24
+ _filePath = @"resources/poi";
25
+ _helper = [TestingHelper new];
26
+ }
27
+
28
+ - (void)tearDown {
29
+ // Put teardown code here. This method is called after the invocation of each test method in the class.
30
+ [super tearDown];
31
+ }
32
+
33
+ - (void) testOutdoorPoiWithCategory {
34
+ SITPOI *poi = [SitumCreatorTests createOutdoorPoiWithCategory];
35
+
36
+ NSDictionary *poiJO = [SitumLocationWrapper.shared poiToJsonObject:poi];
37
+ NSString *fileName = @"poi1";
38
+ //read from json object in resources
39
+ NSDictionary *jsonPoi = [TestingHelper dataFromJSONFileNamed: fileName inDirectory : _filePath];
40
+ [_helper assertPoi: jsonPoi: poiJO];
41
+ }
42
+
43
+ - (void) testPoiWithBuildingFloorAndCoordinateWithCategory {
44
+ SITPOI *poi = [SitumCreatorTests createPoiWithBuildingFloorAndCoordinateWithCategory];
45
+
46
+ NSDictionary *poiJO = [SitumLocationWrapper.shared poiToJsonObject:poi];
47
+ NSString *fileName = @"poi2";
48
+ //read from json object in resources
49
+ NSDictionary *jsonPoi = [TestingHelper dataFromJSONFileNamed: fileName inDirectory : _filePath];
50
+ [_helper assertPoi: jsonPoi: poiJO];
51
+ }
52
+
53
+ - (void) testPoiWithCoordinateAndBuildingId {
54
+ SITPOI *poi = [SitumCreatorTests createPoiWithCoordinateAndBuildingId];
55
+
56
+ NSDictionary *poiJO = [SitumLocationWrapper.shared poiToJsonObject:poi];
57
+ NSString *fileName = @"poi3";
58
+ //read from json object in resources
59
+ NSDictionary *jsonPoi = [TestingHelper dataFromJSONFileNamed: fileName inDirectory : _filePath];
60
+ [_helper assertPoi: jsonPoi: poiJO];
61
+ }
62
+
63
+ - (void) testPoiWithBuildingFloorCoordinateAndCartesian {
64
+ SITPOI *poi = [SitumCreatorTests createPoiWithBuildingFloorCoordinateAndCartesian];
65
+
66
+ NSDictionary *poiJO = [SitumLocationWrapper.shared poiToJsonObject:poi];
67
+ NSString *fileName = @"poi4";
68
+ //read from json object in resources
69
+ NSDictionary *jsonPoi = [TestingHelper dataFromJSONFileNamed: fileName inDirectory : _filePath];
70
+ [_helper assertPoi: jsonPoi: poiJO];
71
+ }
72
+
73
+ - (void) testPoiWithBuildingFloorAndCoordinates {
74
+ SITPOI *poi = [SitumCreatorTests createPoiWithBuildingFloorAndCoordinates];
75
+
76
+ NSDictionary *poiJO = [SitumLocationWrapper.shared poiToJsonObject:poi];
77
+ NSString *fileName = @"poi5";
78
+ //read from json object in resources
79
+ NSDictionary *jsonPoi = [TestingHelper dataFromJSONFileNamed: fileName inDirectory : _filePath];
80
+ [_helper assertPoi: jsonPoi: poiJO];
81
+ }
82
+
83
+ @end
@@ -0,0 +1,107 @@
1
+ //
2
+ // PointTests.m
3
+ // situmcordovaplugintests
4
+ //
5
+ // Created by Cristina Sánchez Barreiro on 13/09/2018.
6
+ //
7
+
8
+ #import <XCTest/XCTest.h>
9
+ #import "SitumCreatorTests.h"
10
+ #import "SitumLocationWrapper.h"
11
+ #import "TestingHelper.h"
12
+
13
+ @interface PointTests : XCTestCase
14
+
15
+ @property(nonatomic, strong) NSString *pointFilePath;
16
+ @property (nonatomic, strong) TestingHelper *helper;
17
+
18
+
19
+ @end
20
+
21
+ @implementation PointTests
22
+
23
+ - (void)setUp {
24
+ [super setUp];
25
+ _pointFilePath = @"resources/point";
26
+ _helper = [TestingHelper new];
27
+ }
28
+
29
+ - (void)tearDown {
30
+ // Put teardown code here. This method is called after the invocation of each test method in the class.
31
+ [super tearDown];
32
+ }
33
+
34
+ - (void) testPoint1 {
35
+ // ### POINT1.JSON ###
36
+ SITPoint *point1 = [SitumCreatorTests createPointWithCoordinate];
37
+ NSDictionary *pointJO1 = [SitumLocationWrapper.shared pointToJsonObject:point1];
38
+ NSString *fileName1 = @"point1";
39
+ //read from json object in resources
40
+ NSDictionary *jsonPoint1 = [TestingHelper dataFromJSONFileNamed: fileName1 inDirectory : _pointFilePath];
41
+ [_helper assertPoint: jsonPoint1: pointJO1];
42
+ }
43
+
44
+ - (void) testPoint2 {
45
+ SITPoint *point2 = [SitumCreatorTests createPointWithCoordinateAndBuildingId];
46
+ NSDictionary *pointJO2 = [SitumLocationWrapper.shared pointToJsonObject:point2];
47
+ NSString *fileName2 = @"point2";
48
+ //read from json object in resources
49
+ NSDictionary *jsonPoint2 = [TestingHelper dataFromJSONFileNamed: fileName2 inDirectory : _pointFilePath];
50
+ [_helper assertPoint: jsonPoint2: pointJO2];
51
+ }
52
+
53
+ - (void) testPoint3 {
54
+ SITPoint *point3 = [SitumCreatorTests createPointWithBuildingIdAndFloor];
55
+ NSDictionary *pointJO3 = [SitumLocationWrapper.shared pointToJsonObject:point3];
56
+ NSString *fileName3 = @"point3";
57
+ //read from json object in resources
58
+ NSDictionary *jsonPoint3 = [TestingHelper dataFromJSONFileNamed: fileName3 inDirectory : _pointFilePath];
59
+ [_helper assertPoint: jsonPoint3: pointJO3];
60
+ }
61
+
62
+ - (void) testPoint4 {
63
+ SITPoint *point4 = [SitumCreatorTests createPointWithBuildingWithAngleFromRadians];
64
+ NSDictionary *pointJO4 = [SitumLocationWrapper.shared pointToJsonObject:point4];
65
+ NSString *fileName4 = @"point4";
66
+ //read from json object in resources
67
+ NSDictionary *jsonPoint4 = [TestingHelper dataFromJSONFileNamed: fileName4 inDirectory : _pointFilePath];
68
+ [_helper assertPoint: jsonPoint4: pointJO4];
69
+ }
70
+
71
+ - (void) testPoint5 {
72
+ SITPoint *point5 = [SitumCreatorTests createPointWithBuildingWithAngleFromDegrees];
73
+ NSDictionary *pointJO5 = [SitumLocationWrapper.shared pointToJsonObject:point5];
74
+ NSString *fileName5 = @"point5";
75
+ //read from json object in resources
76
+ NSDictionary *jsonPoint5 = [TestingHelper dataFromJSONFileNamed: fileName5 inDirectory : _pointFilePath];
77
+ [_helper assertPoint: jsonPoint5: pointJO5];
78
+ }
79
+
80
+ - (void) testPoint6 {
81
+ SITPoint *point6 = [SitumCreatorTests createPointWithBuildingWithAddress];
82
+ NSDictionary *pointJO6 = [SitumLocationWrapper.shared pointToJsonObject:point6];
83
+ NSString *fileName6 = @"point6";
84
+ //read from json object in resources
85
+ NSDictionary *jsonPoint6 = [TestingHelper dataFromJSONFileNamed: fileName6 inDirectory : _pointFilePath];
86
+ [_helper assertPoint: jsonPoint6: pointJO6];
87
+ }
88
+
89
+ - (void) testPoint7 {
90
+ SITPoint *point7 = [SitumCreatorTests createPointWithBuildingWithInfo];
91
+ NSDictionary *pointJO7 = [SitumLocationWrapper.shared pointToJsonObject:point7];
92
+ NSString *fileName7 = @"point7";
93
+ //read from json object in resources
94
+ NSDictionary *jsonPoint7 = [TestingHelper dataFromJSONFileNamed: fileName7 inDirectory : _pointFilePath];
95
+ [_helper assertPoint: jsonPoint7: pointJO7];
96
+ }
97
+
98
+ - (void) testPoint8 {
99
+ SITPoint *point8 = [SitumCreatorTests createPointWithBuildingWithPicture];
100
+ NSDictionary *pointJO8 = [SitumLocationWrapper.shared pointToJsonObject:point8];
101
+ NSString *fileName8 = @"point8";
102
+ //read from json object in resources
103
+ NSDictionary *jsonPoint8 = [TestingHelper dataFromJSONFileNamed: fileName8 inDirectory : _pointFilePath];
104
+ [_helper assertPoint: jsonPoint8: pointJO8];
105
+ }
106
+
107
+ @end
@@ -0,0 +1,78 @@
1
+ //
2
+ // RouteStepTests.m
3
+ // situmcordovaplugintests
4
+ //
5
+ // Created by Cristina Sánchez Barreiro on 13/09/2018.
6
+ //
7
+
8
+ #import <XCTest/XCTest.h>
9
+ #import "SitumCreatorTests.h"
10
+ #import "SitumLocationWrapper.h"
11
+ #import "TestingHelper.h"
12
+
13
+ @interface RouteStepTests : XCTestCase
14
+
15
+ @property (nonatomic, strong) NSString *filePath;
16
+ @property (nonatomic, strong) TestingHelper *helper;
17
+
18
+ @end
19
+
20
+ @implementation RouteStepTests
21
+
22
+ - (void)setUp {
23
+ [super setUp];
24
+ _filePath = @"resources/routeStep";
25
+ _helper = [TestingHelper new];
26
+ }
27
+
28
+ - (void)tearDown {
29
+ // Put teardown code here. This method is called after the invocation of each test method in the class.
30
+ [super tearDown];
31
+ }
32
+
33
+ - (void) testRouteStepWithCoordinate {
34
+ SITRouteStep *routeStep1 = [SitumCreatorTests createRouteStepWithCoordinate];
35
+ NSDictionary *routeStepJO1 = [SitumLocationWrapper.shared routeStepToJsonObject:routeStep1];
36
+ NSString *fileName1 = @"routeStep1";
37
+ //read from json object in resources
38
+ NSDictionary *jsonRouteStep1 = [TestingHelper dataFromJSONFileNamed: fileName1 inDirectory : _filePath];
39
+ [_helper assertRouteStep: jsonRouteStep1: routeStepJO1];
40
+ }
41
+
42
+ - (void) testRouteStepWithCoordinateAndBuildingId {
43
+ SITRouteStep *routeStep2 = [SitumCreatorTests createRouteStepWithCoordinateAndBuildingId];
44
+ NSDictionary *routeStepJO2 = [SitumLocationWrapper.shared routeStepToJsonObject:routeStep2];
45
+ NSString *fileName2 = @"routeStep2";
46
+ //read from json object in resources
47
+ NSDictionary *jsonRouteStep2 = [TestingHelper dataFromJSONFileNamed: fileName2 inDirectory : _filePath];
48
+ [_helper assertRouteStep: jsonRouteStep2: routeStepJO2];
49
+ }
50
+
51
+ - (void) testRouteStepWithCoordinateBuildingIdAndFloor {
52
+ SITRouteStep *routeStep3 = [SitumCreatorTests createRouteStepWithCoordinateBuildingIdAndFloor];
53
+ NSDictionary *routeStepJO3 = [SitumLocationWrapper.shared routeStepToJsonObject:routeStep3];
54
+ NSString *fileName3 = @"routeStep3";
55
+ //read from json object in resources
56
+ NSDictionary *jsonRouteStep3 = [TestingHelper dataFromJSONFileNamed: fileName3 inDirectory : _filePath];
57
+ [_helper assertRouteStep: jsonRouteStep3: routeStepJO3];
58
+ }
59
+
60
+ - (void) testRouteStepWithBuildingWithAngleFromDegree {
61
+ SITRouteStep *routeStep4 = [SitumCreatorTests createRouteStepWithBuildingWithAngleFromDegree];
62
+ NSDictionary *routeStepJO4 = [SitumLocationWrapper.shared routeStepToJsonObject:routeStep4];
63
+ NSString *fileName4 = @"routeStep4";
64
+ //read from json object in resources
65
+ NSDictionary *jsonRouteStep4 = [TestingHelper dataFromJSONFileNamed: fileName4 inDirectory : _filePath];
66
+ [_helper assertRouteStep: jsonRouteStep4: routeStepJO4];
67
+ }
68
+
69
+ - (void) testRouteStepWithBuildingWithAngleFromRadians {
70
+ SITRouteStep *routeStep5 = [SitumCreatorTests createRouteStepWithBuildingWithAngleFromRadians];
71
+ NSDictionary *routeStepJO5 = [SitumLocationWrapper.shared routeStepToJsonObject:routeStep5];
72
+ NSString *fileName5 = @"routeStep5";
73
+ //read from json object in resources
74
+ NSDictionary *jsonRouteStep5 = [TestingHelper dataFromJSONFileNamed: fileName5 inDirectory : _filePath];
75
+ [_helper assertRouteStep: jsonRouteStep5: routeStepJO5];
76
+ }
77
+
78
+ @end
@@ -0,0 +1,42 @@
1
+ //
2
+ // RouteTests.m
3
+ // situmcordovaplugintests
4
+ //
5
+ // Created by Cristina Sánchez Barreiro on 13/09/2018.
6
+ //
7
+
8
+ #import <XCTest/XCTest.h>
9
+ #import "SitumCreatorTests.h"
10
+ #import "SitumLocationWrapper.h"
11
+ #import "TestingHelper.h"
12
+
13
+ @interface RouteTests : XCTestCase
14
+
15
+ @property (nonatomic, strong) NSString *filePath;
16
+ @property (nonatomic, strong) TestingHelper *helper;
17
+
18
+ @end
19
+
20
+ @implementation RouteTests
21
+
22
+ - (void)setUp {
23
+ [super setUp];
24
+ _filePath = @"resources/route";
25
+ _helper = [TestingHelper new];
26
+ }
27
+
28
+ - (void)tearDown {
29
+ // Put teardown code here. This method is called after the invocation of each test method in the class.
30
+ [super tearDown];
31
+ }
32
+
33
+ - (void) testRoute {
34
+ SITRoute *route1 = [SitumCreatorTests createRouteBuildingWithDegreesPointWithCoordinates];
35
+ NSDictionary *routeJO1 = [SitumLocationWrapper.shared routeToJsonObject:route1];
36
+ NSString *fileName1 = @"route1";
37
+ //read from json object in resources
38
+ NSDictionary *jsonRoute1 = [TestingHelper dataFromJSONFileNamed: fileName1 inDirectory : _filePath];
39
+ [_helper assertRoute: jsonRoute1: routeJO1];
40
+ }
41
+
42
+ @end
@@ -0,0 +1,91 @@
1
+ //
2
+ // situmcordovapluginCreatorTests.h
3
+ // situmcordovapluginTests
4
+ //
5
+ // Created by Situm 03/7/18.
6
+ // Copyright © 2018 Situm. All rights reserved.
7
+ //
8
+ #import <Foundation/Foundation.h>
9
+ #import <SitumSDK/SitumSDK.h>
10
+
11
+ @interface SitumCreatorTests : NSObject
12
+
13
+ //angle
14
+ + (SITAngle *) createAngleFromDegrees; //angle1.json
15
+ + (SITAngle *) createAngleFromRadians; //angle2.json
16
+ //bounds
17
+ + (SITBounds) createBoundsWithArray; //bounds1.json
18
+ + (SITBounds) createBounds; //bounds2.json
19
+ //building
20
+ + (SITBuilding *) createBuilding;
21
+ //cartesianCoordinate
22
+ + (SITCartesianCoordinate *) createCartesianCoordinate; //cartesianCoordinate1.json
23
+ //coordinate
24
+ + (CLLocationCoordinate2D) createCoordinate; //coordinate1.json
25
+ //dimensions
26
+ + (SITDimensions *) createDimensions; //dimensions1.json
27
+ //dimensions
28
+ + (SITEvent *) createEvent; //event1.json
29
+ //floor
30
+ + (SITFloor *) createFloorWithAltitude; //floor1.json
31
+ + (SITFloor *) createFloorWithoutAltitude; //floor2.json
32
+ //indication
33
+ + (SITIndication *) createIndication;
34
+
35
+ //locationRequest
36
+ + (SITLocationRequest *) createLegacyLocationRequest;
37
+ + (SITLocationRequest *) createLocationRequestWithoutGpsNorDeadReckoning;
38
+ + (SITLocationRequest *) createLocationRequestWithGpsAndDeadReckoning;
39
+ + (SITLocationRequest *) createLocationRequestWithBatterySaver; //locationRequest4.json
40
+
41
+ //directionsRequest
42
+ + (SITDirectionsRequest *) createDirectionsRequestWithPOI;
43
+ + (SITDirectionsRequest *) createDirectionsRequestWithLocation;
44
+ + (SITDirectionsRequest *) createDirectionsRequestWithAccessible;
45
+ //location
46
+ + (SITLocation *) createLocationWithBuildingFloorAndCartesianCoordinates; //location1.json
47
+ + (SITLocation *) createLocationWithCoordinate; //location2.json
48
+ + (SITLocation *) createLocationWithBuildingAndCoordinate; //location3.json
49
+ + (SITLocation *) locationWithCartesianBearing; //location4.json
50
+ + (SITLocation *) locationWithoutCartesianBearing; //location5.json
51
+ + (SITLocation *) locationWithBearing; //location6.json
52
+ + (SITLocation *) locationWithouthBearing; //location7.json
53
+ + (SITLocation *) indoorLocationWithIndoorBearingQualityLow; //location8.json
54
+ + (SITLocation *) indoorLocationWithIndoorBearingQualityHigh; //location9.json
55
+ + (SITLocation *) outdoorLocation; //location10.json
56
+ //locationStatus
57
+ + (SITLocationState) createLocationStatusStarting; //locationStatus1.json
58
+ + (SITLocationState) createLocationStatusCalculating; //locationStatus3.json
59
+ + (SITLocationState) createLocationStatusUserNotInBuilding; //locationStatus13.json
60
+ //navigationProgress
61
+ + (SITNavigationProgress *) createNavigationProgressOutdoor; //navigationProgress1.json
62
+ + (SITNavigationProgress *) createNavigationProgressIndoor; //navigationProgress2.json
63
+ //poi
64
+ + (SITPOI *) createOutdoorPoiWithCategory;
65
+ + (SITPOI *) createPoiWithBuildingFloorAndCoordinateWithCategory;
66
+ + (SITPOI *) createPoiWithCoordinateAndBuildingId;
67
+ + (SITPOI *) createPoiWithBuildingFloorCoordinateAndCartesian;
68
+ + (SITPOI *) createPoiWithBuildingFloorAndCoordinates;
69
+ //poiCategory
70
+ + (SITPOICategory *) createPoiCategory; //poiCategory1.json
71
+ + (UIImage *) createPoiCategoryIcon;
72
+ //point
73
+ + (SITPoint *) createPointWithCoordinate; //point1.json
74
+ + (SITPoint *) createPointWithCoordinateAndBuildingId; //point2.json
75
+ + (SITPoint *) createPointWithBuildingIdAndFloor; //point3.json
76
+ + (SITPoint *) createPointWithBuildingWithAngleFromRadians; //point4.json
77
+ + (SITPoint *) createPointWithBuildingWithAngleFromDegrees; //point5.json
78
+ + (SITPoint *) createPointWithBuildingWithAddress; //point6.json
79
+ + (SITPoint *) createPointWithBuildingWithInfo; //point7.json
80
+ + (SITPoint *) createPointWithBuildingWithPicture; //point8.json
81
+ //route
82
+ + (SITRoute *) createRouteBuildingWithDegreesPointWithCoordinates; //route1.json
83
+ //routeStep
84
+ + (SITRouteStep *) createRouteStepWithCoordinate; //routeStep1.json
85
+ + (SITRouteStep *) createRouteStepWithCoordinateAndBuildingId; //routeStep2.json
86
+ + (SITRouteStep *) createRouteStepWithCoordinateBuildingIdAndFloor; //routeStep3.json
87
+ + (SITRouteStep *) createRouteStepWithBuildingWithAngleFromDegree; //routeStep4.json
88
+ + (SITRouteStep *) createRouteStepWithBuildingWithAngleFromRadians; //routeStep5.json
89
+ //situmConversionArea
90
+ + (SITRectangularArea *) createSitumConversionArea; //situmConversionArea1.json
91
+ @end