-
Notifications
You must be signed in to change notification settings - Fork 0
/
MockData.ts
211 lines (185 loc) · 5.45 KB
/
MockData.ts
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
// tslint:disable:completed-docs
export class MockData {
public static readonly timesHHmmss: string[] = [
"12:00:00",
"01:09:09",
"23:59:59",
"00:59:59",
"23:01:01",
];
public static readonly timesHHmm: string[] = [
"12:53",
"12:00",
"01:09",
"23:59",
"00:59",
"23:01",
];
public static readonly timesHmm: string[] = [
"1:59",
"9:09",
"9:09",
];
public static readonly invalidTimes: string[] = [
"24:00",
"24:13:56",
"12:61",
"12:60",
"12:59:60",
"30:61",
"12:12:61",
"12:61:61",
"30:61:61",
];
public static readonly charactersString = "+=§,.-?:_\"!)/()<>*'$[]}{*&^%$#@!/\\|#&@{}^'`][~|€¶←↓→º’‘©><§®ª`←'↓&×÷|÷×";
public static readonly characters = MockData.charactersString.split("");
public static readonly charactersCaseAbleString = "þÞıŦŧŊEĐđNΩ";
public static readonly charactersCaseAble: string[] = MockData.charactersCaseAbleString.split("");
public static readonly charactersEmpty: string[] = [
" ",
" ",
"",
" ",
"\t",
"\xa0",
"\t \xa0\t \xa0",
" ",
"\t\t",
"\xa0\xa0",
];
public static readonly charactersNotEmpty: string[] = [
" 3 ",
"a",
"0",
"[]",
"A",
"{}",
".",
"123",
"gabriel",
"Ich bin Hanz",
"@",
// "123@123.123",
"00000000000000000000",
"\\",
"/",
"********",
"______",
];
public static readonly numbersString = "0123456789";
public static readonly numbers = MockData.numbersString.split("");
public static readonly randomArray: unknown[] = [
"a",
1,
2.32,
true,
(a: number, b: number): number => a + b,
{},
null,
undefined,
Infinity,
NaN,
{
a: "aa",
b: "bb",
},
["a", 1, true],
];
public static readonly stringHelloWorldIAmComputer: string[] = [
"Hello world i am computer",
"HelloWorldIAmComputer",
"helloWorldIAmComputer",
"hello_world_i_am_computer",
"HELLO_WORLD_I_AM_COMPUTER",
"--------Hello world---i am computer____",
"hello_World i Am-computer",
"hello_World i Am-computer-------",
"-_Hello___world-i--AM computer",
];
public static readonly upperSnakeCase: string[] = [
"HELLO_WORLD",
"HELLO_MY_NAME_IS_CHOSE",
];
public static readonly lowerSnakeCase: string[] = [
"hello_world",
"hello_my_name_is_chose",
];
public static readonly upperCamelCase: string[] = [
"HelloWorld",
"HelloMyNameIsChose",
];
public static readonly lowerCamelCase: string[] = [
"helloWorld",
"helloMyNameIsChose",
];
public static readonly randomStrings: string[] = [
...MockData.stringHelloWorldIAmComputer,
...MockData.upperSnakeCase,
...MockData.lowerSnakeCase,
...MockData.upperCamelCase,
...MockData.lowerCamelCase,
];
public static readonly man = ["Muž", "muz", "MAN", "m", "boY", "chLaPec", "M", "male"];
public static readonly woman = ["Žena", "zena", "WOMAN", "w", "z", "GiRl", "Dievča", "woman", "female", "f"];
public static readonly nothing: string[] = [
...MockData.charactersEmpty,
...MockData.randomStrings,
...MockData.numbers,
...MockData.characters,
...MockData.charactersCaseAble,
...MockData.charactersNotEmpty,
];
public static readonly phoneNumbers: string[] = [
"+421905123456",
"00421905123456",
"0905123456",
"+421 905 123 456",
"00421905 123 456",
"0905 123 456",
"(123) 456-7890",
"(123)456-7890",
"(048)99-99-999",
"123-456-7890",
"123.456.7890",
"1234567890",
"+31636363634",
"075-63546725",
];
public static readonly emails: string[] = [
"abc@def.com",
"my@name.is.chorche.com",
"foo.bar@machine.subdomain.example.museum",
"Abc@example.com",
// `Abc@example.com.`,
// `Abc@10.42.0.1`,
// `user@localserver`,
"Abc.123@example.com",
"user+mailbox/department=shipping@example.com",
"\"very.(),:;<>[]\".VERY.\"very@\\ \"very\".unusual\"@strange.example.com",
"!#$%&'*+-/=?^_`.{|}~@example.com",
"\"()<>[]:,;@\\\"!#$%&'-/=?^_`{}| ~.a\"@example.org",
"\"Abc@def\"@example.com",
"\"Fred Bloggs\"@example.com",
"\"Joe.\\Blow\"@example.com",
// "Loïc.Accentué@voilà.fr",
// "\" \"@example.org\"",
// "user@[IPv6:2001:DB8::1]",
];
public static readonly notEmails: string[] = [
"Abc.example.com",
"A@b@c@example.com",
"a\"b(c)d,e:f;g<h>i[j\\k]l@example.com",
"just\"not\"right@example.com",
"this is\"notallowed@example.com",
"this still\"not\\allowed@example.com",
"john..doe@example.com",
"john.doe@example..com",
...MockData.randomStrings,
];
public static functionSum(a: number, b: number): number {
if (isNaN(a) || isNaN(b)) {
throw new Error("Wrong params");
}
return a + b;
}
}