Constants.swift 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // Copyright 2021 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. import Foundation
  15. /// String constants used for testing.
  16. enum Constants {
  17. static let key1 = "Key1"
  18. static let jedi = "Jedi"
  19. static let sith = "Sith_Lord"
  20. static let value1 = "Value1"
  21. static let obiwan = "Obi-Wan"
  22. static let yoda = "Yoda"
  23. static let darthSidious = "Darth Sidious"
  24. static let stringKey = "myString"
  25. static let stringValue = "string contents"
  26. static let intKey = "myInt"
  27. static let intValue: Int = 123
  28. static let floatKey = "myFloat"
  29. static let floatValue: Float = 42.75
  30. static let doubleValue: Double = 42.75
  31. static let decimalKey = "myDecimal"
  32. static let decimalValue: Decimal = 375.785
  33. static let trueKey = "myTrue"
  34. static let falseKey = "myFalse"
  35. static let dataKey = "myData"
  36. static let dataValue: Data = "data".data(using: .utf8)!
  37. static let jsonKey = "Recipe"
  38. static let jsonValue: [String: AnyHashable] = ["recipeName": "PB&J",
  39. "ingredients": ["bread", "peanut butter", "jelly"],
  40. "cookTime": 7]
  41. static let nonJsonKey = "notJSON"
  42. static let nonJsonValue = "notJSON"
  43. }