2
0

UnitTestTypes.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. using System.Collections.Generic;
  2. using BansheeEngine;
  3. namespace BansheeEditor
  4. {
  5. public class UT1_Component1 : Component
  6. {
  7. public int a;
  8. public string b;
  9. public UT1_SerzObj complex = new UT1_SerzObj();
  10. public UT1_SerzCls complex2 = new UT1_SerzCls();
  11. public int[] arrA;
  12. public string[] arrB;
  13. public UT1_SerzObj[] arrComplex;
  14. public UT1_SerzCls[] arrComplex2;
  15. public List<int> listA;
  16. public List<string> listB;
  17. public List<UT1_SerzObj> listComplex;
  18. public List<UT1_SerzCls> listComplex2;
  19. public UT1_Component2 otherComponent;
  20. public SceneObject otherSO;
  21. }
  22. public class UT1_Component2 : Component
  23. {
  24. public int a2;
  25. }
  26. [SerializeObject]
  27. public class UT1_SerzCls
  28. {
  29. public int someValue2;
  30. public string anotherValue2;
  31. public UT1_SerzCls child;
  32. }
  33. [SerializeObject]
  34. public struct UT1_SerzObj
  35. {
  36. public UT1_SerzObj(int someValue, string anotherValue)
  37. {
  38. this.someValue = someValue;
  39. this.anotherValue = anotherValue;
  40. }
  41. public int someValue;
  42. public string anotherValue;
  43. }
  44. [SerializeObject]
  45. public class UT_DiffChildObj
  46. {
  47. public int plain1 = 101;
  48. public string plain2 = "oneoone";
  49. }
  50. [SerializeObject]
  51. public class UT_DiffObj
  52. {
  53. public int plain1 = 5;
  54. public string plain2 = "six";
  55. public UT_DiffChildObj complex = null;
  56. public UT_DiffChildObj complex2 = new UT_DiffChildObj();
  57. public UT_DiffChildObj complex3 = new UT_DiffChildObj();
  58. public int[] arrPlain1 = { 10, 11, 12 };
  59. public string[] arrPlain2 = { "one", "two", "three" };
  60. public UT_DiffChildObj[] arrComplex = null;
  61. public UT_DiffChildObj[] arrComplex2 = new UT_DiffChildObj[2];
  62. public List<int> listPlain1 = new List<int>();
  63. public List<string> listPlain2 = new List<string>();
  64. public List<UT_DiffChildObj> listComplex = null;
  65. public List<UT_DiffChildObj> listComplex2 = new List<UT_DiffChildObj>();
  66. public Dictionary<int, int> dictPlain1 = new Dictionary<int, int>();
  67. public Dictionary<string, string> dictPlain2 = new Dictionary<string, string>();
  68. public Dictionary<int, UT_DiffChildObj> dictComplex = null;
  69. public Dictionary<int, UT_DiffChildObj> dictComplex2 = new Dictionary<int, UT_DiffChildObj>();
  70. public UT_DiffObj()
  71. {
  72. arrComplex2[0] = new UT_DiffChildObj();
  73. arrComplex2[1] = null;
  74. listPlain1.AddRange(new int[] { 4, 5, 6 });
  75. listPlain2.AddRange(new string[] {"four", "five", "six"});
  76. listComplex2.Add(new UT_DiffChildObj());
  77. listComplex2.Add(new UT_DiffChildObj());
  78. dictPlain1[20] = 20;
  79. dictPlain1[21] = 21;
  80. dictPlain1[22] = 22;
  81. dictPlain2["twenty"] = "twenty";
  82. dictPlain2["twentyone"] = "twentyone";
  83. dictPlain2["twentytwo"] = "twentytwo";
  84. dictComplex2[30] = new UT_DiffChildObj();
  85. dictComplex2[31] = new UT_DiffChildObj();
  86. dictComplex2[32] = new UT_DiffChildObj();
  87. }
  88. }
  89. }