| | | 1 | | using ValidateLib.ErrorsAndWarnings.Warnings; |
| | | 2 | | using ValidateLib.Metadata.ParsingAndValidation; |
| | | 3 | | |
| | | 4 | | namespace ParsingTests |
| | | 5 | | { |
| | | 6 | | public class WarningTests |
| | | 7 | | { |
| | | 8 | | public readonly string testFilesDirectory; |
| | 1 | 9 | | public WarningTests() |
| | 1 | 10 | | { |
| | 1 | 11 | | testFilesDirectory = Path.Combine(GetProjectDirectory(), "TestFiles"); |
| | 1 | 12 | | } |
| | | 13 | | static string GetProjectDirectory() |
| | 1 | 14 | | { |
| | 1 | 15 | | string? currentDirectory = Directory.GetCurrentDirectory(); |
| | | 16 | | |
| | 1 | 17 | | while (!string.IsNullOrEmpty(currentDirectory)) |
| | 1 | 18 | | { |
| | 1 | 19 | | string[] projectFiles = Directory.GetFiles(currentDirectory, "*.csproj"); |
| | | 20 | | |
| | 1 | 21 | | if (projectFiles.Length > 0) |
| | 1 | 22 | | return currentDirectory; |
| | 1 | 23 | | currentDirectory = Directory.GetParent(currentDirectory)?.FullName; |
| | 1 | 24 | | } |
| | | 25 | | |
| | 0 | 26 | | throw new Exception("Could not find project directory."); |
| | 1 | 27 | | } |
| | | 28 | | |
| | | 29 | | [Fact] |
| | | 30 | | public void WarningTestsInvalidNullCSVW040() |
| | 1 | 31 | | { |
| | 1 | 32 | | var testNumber = "040"; |
| | 1 | 33 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 34 | | string jsonString = File.ReadAllText(testFilePath); |
| | 1 | 35 | | var warnings = new List<Warning>(); |
| | | 36 | | |
| | 1 | 37 | | var tableGroupDescriptor = MetadataParserValidator.ProcessTableGroup( |
| | 1 | 38 | | warnings, |
| | 1 | 39 | | testFilePath |
| | 1 | 40 | | ); |
| | | 41 | | |
| | 1 | 42 | | Assert.Single(warnings); |
| | | 43 | | |
| | | 44 | | |
| | 1 | 45 | | } |
| | | 46 | | |
| | | 47 | | |
| | | 48 | | [Fact] |
| | | 49 | | public void WarningTestsInvalidLangCSVW041() |
| | 1 | 50 | | { |
| | 1 | 51 | | var testNumber = "041"; |
| | 1 | 52 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 53 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 54 | | |
| | 1 | 55 | | var warnings = new List<Warning>(); |
| | | 56 | | |
| | 1 | 57 | | var tableGroupDescriptor = MetadataParserValidator.ProcessTableGroup( |
| | 1 | 58 | | warnings, |
| | 1 | 59 | | testFilePath |
| | 1 | 60 | | ); |
| | | 61 | | |
| | 1 | 62 | | Assert.Single(warnings); |
| | | 63 | | |
| | 1 | 64 | | } |
| | | 65 | | |
| | | 66 | | [Fact] |
| | | 67 | | public void WarningTestsInvalidTextDirectionCSVW042() |
| | 1 | 68 | | { |
| | 1 | 69 | | var testNumber = "042"; |
| | 1 | 70 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 71 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 72 | | |
| | 1 | 73 | | var warnings = new List<Warning>(); |
| | | 74 | | |
| | 1 | 75 | | var tableGroupDescriptor = MetadataParserValidator.ProcessTableGroup( |
| | 1 | 76 | | warnings, |
| | 1 | 77 | | testFilePath |
| | 1 | 78 | | ); |
| | | 79 | | |
| | 1 | 80 | | Assert.Single(warnings); |
| | | 81 | | |
| | 1 | 82 | | } |
| | | 83 | | |
| | | 84 | | [Fact] |
| | | 85 | | public void WarningTestsInvalidSeparatorCSVW043() |
| | 1 | 86 | | { |
| | 1 | 87 | | var testNumber = "043"; |
| | 1 | 88 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 89 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 90 | | |
| | 1 | 91 | | var warnings = new List<Warning>(); |
| | 1 | 92 | | var tableGroupDescriptor = MetadataParserValidator.ProcessTableGroup( |
| | 1 | 93 | | warnings, |
| | 1 | 94 | | testFilePath |
| | 1 | 95 | | ); |
| | | 96 | | |
| | 1 | 97 | | Assert.Single(warnings); |
| | | 98 | | |
| | 1 | 99 | | } |
| | | 100 | | |
| | | 101 | | [Fact] |
| | | 102 | | public void WarningTestsInvalidOrderedCSVW044() |
| | 1 | 103 | | { |
| | 1 | 104 | | var testNumber = "044"; |
| | 1 | 105 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 106 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 107 | | |
| | 1 | 108 | | var warnings = new List<Warning>(); |
| | 1 | 109 | | var tableGroupDescriptor = MetadataParserValidator.ProcessTableGroup( |
| | 1 | 110 | | warnings, |
| | 1 | 111 | | testFilePath |
| | 1 | 112 | | ); |
| | | 113 | | |
| | 1 | 114 | | Assert.Single(warnings); |
| | | 115 | | |
| | 1 | 116 | | } |
| | | 117 | | |
| | | 118 | | [Fact] |
| | | 119 | | public void WarningTestsInvalidDefaultCSVW045() |
| | 1 | 120 | | { |
| | 1 | 121 | | var testNumber = "045"; |
| | 1 | 122 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 123 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 124 | | |
| | 1 | 125 | | var warnings = new List<Warning>(); |
| | 1 | 126 | | var tableGroupDescriptor = MetadataParserValidator.ProcessTableGroup( |
| | 1 | 127 | | warnings, |
| | 1 | 128 | | testFilePath |
| | 1 | 129 | | ); |
| | | 130 | | |
| | 1 | 131 | | Assert.Single(warnings); |
| | | 132 | | |
| | 1 | 133 | | } |
| | | 134 | | [Fact] |
| | | 135 | | public void WarningTestsInvalidDatatypeCSVW046() |
| | 1 | 136 | | { |
| | 1 | 137 | | var testNumber = "046"; |
| | 1 | 138 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 139 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 140 | | |
| | 1 | 141 | | var warnings = new List<Warning>(); |
| | 1 | 142 | | var tableGroupDescriptor = MetadataParserValidator.ProcessTableGroup( |
| | 1 | 143 | | warnings, |
| | 1 | 144 | | testFilePath |
| | 1 | 145 | | ); |
| | | 146 | | |
| | 1 | 147 | | Assert.Single(warnings); |
| | | 148 | | |
| | 1 | 149 | | } |
| | | 150 | | [Fact] |
| | | 151 | | public void WarningTestsInvalidAboutUrlCSVW047() |
| | 1 | 152 | | { |
| | 1 | 153 | | var testNumber = "047"; |
| | 1 | 154 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 155 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 156 | | |
| | 1 | 157 | | var warnings = new List<Warning>(); |
| | 1 | 158 | | var tableGroupDescriptor = MetadataParserValidator.ProcessTableGroup( |
| | 1 | 159 | | warnings, |
| | 1 | 160 | | testFilePath |
| | 1 | 161 | | ); |
| | | 162 | | |
| | 1 | 163 | | Assert.Single(warnings); |
| | | 164 | | |
| | 1 | 165 | | } |
| | | 166 | | |
| | | 167 | | [Fact] |
| | | 168 | | public void WarningTestsInvalidPropertyUrlCSVW048() |
| | 1 | 169 | | { |
| | 1 | 170 | | var testNumber = "048"; |
| | 1 | 171 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 172 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 173 | | |
| | 1 | 174 | | var warnings = new List<Warning>(); |
| | 1 | 175 | | var tableGroupDescriptor = MetadataParserValidator.ProcessTableGroup( |
| | 1 | 176 | | warnings, |
| | 1 | 177 | | testFilePath |
| | 1 | 178 | | ); |
| | | 179 | | |
| | 1 | 180 | | Assert.Single(warnings); |
| | | 181 | | |
| | 1 | 182 | | } |
| | | 183 | | [Fact] |
| | | 184 | | public void WarningTestsInvalidValueUrlCSVW049() |
| | 1 | 185 | | { |
| | 1 | 186 | | var testNumber = "049"; |
| | 1 | 187 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 188 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 189 | | |
| | 1 | 190 | | var warnings = new List<Warning>(); |
| | 1 | 191 | | var tableGroupDescriptor = MetadataParserValidator.ProcessTableGroup( |
| | 1 | 192 | | warnings, |
| | 1 | 193 | | testFilePath |
| | 1 | 194 | | ); |
| | | 195 | | |
| | 1 | 196 | | Assert.Single(warnings); |
| | | 197 | | |
| | 1 | 198 | | } |
| | | 199 | | |
| | | 200 | | [Fact] |
| | | 201 | | public void WarningTestsInvalidCommentPrefixCSVW059() |
| | 1 | 202 | | { |
| | 1 | 203 | | var testNumber = "059"; |
| | 1 | 204 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 205 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 206 | | |
| | 1 | 207 | | var warnings = new List<Warning>(); |
| | 1 | 208 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 209 | | warnings, |
| | 1 | 210 | | testFilePath |
| | 1 | 211 | | ); |
| | | 212 | | |
| | 1 | 213 | | Assert.Single(warnings); |
| | | 214 | | |
| | 1 | 215 | | } |
| | | 216 | | |
| | | 217 | | [Fact] |
| | | 218 | | public void WarningTestsInvalidDelimiterCSVW060() |
| | 1 | 219 | | { |
| | 1 | 220 | | var testNumber = "060"; |
| | 1 | 221 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 222 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 223 | | |
| | 1 | 224 | | var warnings = new List<Warning>(); |
| | 1 | 225 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 226 | | warnings, |
| | 1 | 227 | | testFilePath |
| | 1 | 228 | | ); |
| | | 229 | | |
| | 1 | 230 | | Assert.Single(warnings); |
| | | 231 | | |
| | 1 | 232 | | } |
| | | 233 | | |
| | | 234 | | [Fact] |
| | | 235 | | public void WarningTestsInvalidDoubleQuoteCSVW061() |
| | 1 | 236 | | { |
| | 1 | 237 | | var testNumber = "061"; |
| | 1 | 238 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 239 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 240 | | |
| | 1 | 241 | | var warnings = new List<Warning>(); |
| | 1 | 242 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 243 | | warnings, |
| | 1 | 244 | | testFilePath |
| | 1 | 245 | | ); |
| | | 246 | | |
| | 1 | 247 | | Assert.Single(warnings); |
| | | 248 | | |
| | 1 | 249 | | } |
| | | 250 | | |
| | | 251 | | [Fact] |
| | | 252 | | public void WarningTestsInvalidEncodingCSVW062() |
| | 1 | 253 | | { |
| | 1 | 254 | | var testNumber = "061"; |
| | 1 | 255 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 256 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 257 | | |
| | 1 | 258 | | var warnings = new List<Warning>(); |
| | 1 | 259 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 260 | | warnings, |
| | 1 | 261 | | testFilePath |
| | 1 | 262 | | ); |
| | | 263 | | |
| | 1 | 264 | | Assert.Single(warnings); |
| | | 265 | | |
| | 1 | 266 | | } |
| | | 267 | | |
| | | 268 | | [Fact] |
| | | 269 | | public void WarningTestsInvalidHeaderCSVW063() |
| | 1 | 270 | | { |
| | 1 | 271 | | var testNumber = "063"; |
| | 1 | 272 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 273 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 274 | | |
| | 1 | 275 | | var warnings = new List<Warning>(); |
| | 1 | 276 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 277 | | warnings, |
| | 1 | 278 | | testFilePath |
| | 1 | 279 | | ); |
| | | 280 | | |
| | 1 | 281 | | Assert.Single(warnings); |
| | | 282 | | |
| | 1 | 283 | | } |
| | | 284 | | |
| | | 285 | | [Fact] |
| | | 286 | | public void WarningTestsInvalidHeaderRowCountCSVW065() |
| | 1 | 287 | | { |
| | 1 | 288 | | var testNumber = "065"; |
| | 1 | 289 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 290 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 291 | | |
| | 1 | 292 | | var warnings = new List<Warning>(); |
| | 1 | 293 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 294 | | warnings, |
| | 1 | 295 | | testFilePath |
| | 1 | 296 | | ); |
| | | 297 | | |
| | 1 | 298 | | Assert.Single(warnings); |
| | | 299 | | |
| | 1 | 300 | | } |
| | | 301 | | |
| | | 302 | | [Fact] |
| | | 303 | | public void WarningTestsInvalidLineTerminatorsCSVW066() |
| | 1 | 304 | | { |
| | 1 | 305 | | var testNumber = "066"; |
| | 1 | 306 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 307 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 308 | | |
| | 1 | 309 | | var warnings = new List<Warning>(); |
| | 1 | 310 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 311 | | warnings, |
| | 1 | 312 | | testFilePath |
| | 1 | 313 | | ); |
| | | 314 | | |
| | 1 | 315 | | Assert.Single(warnings); |
| | | 316 | | |
| | 1 | 317 | | } |
| | | 318 | | |
| | | 319 | | [Fact] |
| | | 320 | | public void WarningTestsInvalidQuoteCharCSVW067() |
| | 1 | 321 | | { |
| | 1 | 322 | | var testNumber = "067"; |
| | 1 | 323 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 324 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 325 | | |
| | 1 | 326 | | var warnings = new List<Warning>(); |
| | 1 | 327 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 328 | | warnings, |
| | 1 | 329 | | testFilePath |
| | 1 | 330 | | ); |
| | | 331 | | |
| | 1 | 332 | | Assert.Single(warnings); |
| | | 333 | | |
| | 1 | 334 | | } |
| | | 335 | | |
| | | 336 | | [Fact] |
| | | 337 | | public void WarningTestsInvalidSkipBlankRowsCSVW068() |
| | 1 | 338 | | { |
| | 1 | 339 | | var testNumber = "068"; |
| | 1 | 340 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 341 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 342 | | |
| | 1 | 343 | | var warnings = new List<Warning>(); |
| | 1 | 344 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 345 | | warnings, |
| | 1 | 346 | | testFilePath |
| | 1 | 347 | | ); |
| | | 348 | | |
| | 1 | 349 | | Assert.Single(warnings); |
| | | 350 | | |
| | 1 | 351 | | } |
| | | 352 | | |
| | | 353 | | [Fact] |
| | | 354 | | public void WarningTestsInvalidSkipColumnsCSVW069() |
| | 1 | 355 | | { |
| | 1 | 356 | | var testNumber = "069"; |
| | 1 | 357 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 358 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 359 | | |
| | 1 | 360 | | var warnings = new List<Warning>(); |
| | 1 | 361 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 362 | | warnings, |
| | 1 | 363 | | testFilePath |
| | 1 | 364 | | ); |
| | | 365 | | |
| | 1 | 366 | | Assert.Single(warnings); |
| | | 367 | | |
| | 1 | 368 | | } |
| | | 369 | | |
| | | 370 | | [Fact] |
| | | 371 | | public void WarningTestsInvalidSkipInitialSpaceCSVW070() |
| | 1 | 372 | | { |
| | 1 | 373 | | var testNumber = "070"; |
| | 1 | 374 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 375 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 376 | | |
| | 1 | 377 | | var warnings = new List<Warning>(); |
| | 1 | 378 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 379 | | warnings, |
| | 1 | 380 | | testFilePath |
| | 1 | 381 | | ); |
| | | 382 | | |
| | 1 | 383 | | Assert.Single(warnings); |
| | | 384 | | |
| | 1 | 385 | | } |
| | | 386 | | |
| | | 387 | | [Fact] |
| | | 388 | | public void WarningTestsInvalidSkipRowsCSVW071() |
| | 1 | 389 | | { |
| | 1 | 390 | | var testNumber = "071"; |
| | 1 | 391 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 392 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 393 | | |
| | 1 | 394 | | var warnings = new List<Warning>(); |
| | 1 | 395 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 396 | | warnings, |
| | 1 | 397 | | testFilePath |
| | 1 | 398 | | ); |
| | | 399 | | |
| | 1 | 400 | | Assert.Single(warnings); |
| | | 401 | | |
| | 1 | 402 | | } |
| | | 403 | | |
| | | 404 | | [Fact] |
| | | 405 | | public void WarningTestsInvalidTrimCSVW072() |
| | 1 | 406 | | { |
| | 1 | 407 | | var testNumber = "072"; |
| | 1 | 408 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 409 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 410 | | |
| | 1 | 411 | | var warnings = new List<Warning>(); |
| | 1 | 412 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 413 | | warnings, |
| | 1 | 414 | | testFilePath |
| | 1 | 415 | | ); |
| | | 416 | | |
| | 1 | 417 | | Assert.Single(warnings); |
| | | 418 | | |
| | 1 | 419 | | } |
| | | 420 | | [Fact] |
| | | 421 | | public void WarningTestsInvalidLanguageCSVW073() |
| | 1 | 422 | | { |
| | 1 | 423 | | var testNumber = "073"; |
| | 1 | 424 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 425 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 426 | | |
| | 1 | 427 | | var warnings = new List<Warning>(); |
| | 1 | 428 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 429 | | warnings, |
| | 1 | 430 | | testFilePath |
| | 1 | 431 | | ); |
| | | 432 | | |
| | 1 | 433 | | Assert.Single(warnings); |
| | | 434 | | |
| | 1 | 435 | | } |
| | | 436 | | |
| | | 437 | | [Fact] |
| | | 438 | | public void WarningTestsInvalidTableGroupTableDirectionCSVW075() |
| | 1 | 439 | | { |
| | 1 | 440 | | var testNumber = "075"; |
| | 1 | 441 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 442 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 443 | | |
| | 1 | 444 | | var warnings = new List<Warning>(); |
| | 1 | 445 | | var tableGroupDescriptor = MetadataParserValidator.ProcessTableGroup( |
| | 1 | 446 | | warnings, |
| | 1 | 447 | | testFilePath |
| | 1 | 448 | | ); |
| | | 449 | | |
| | 1 | 450 | | Assert.Single(warnings); |
| | | 451 | | |
| | 1 | 452 | | } |
| | | 453 | | |
| | | 454 | | [Fact] |
| | | 455 | | public void WarningTestsInvalidTableTableDirectionCSVW076() |
| | 1 | 456 | | { |
| | 1 | 457 | | var testNumber = "076"; |
| | 1 | 458 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 459 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 460 | | |
| | 1 | 461 | | var warnings = new List<Warning>(); |
| | 1 | 462 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 463 | | warnings, |
| | 1 | 464 | | testFilePath |
| | 1 | 465 | | ); |
| | | 466 | | |
| | 1 | 467 | | Assert.Single(warnings); |
| | | 468 | | |
| | 1 | 469 | | } |
| | | 470 | | |
| | | 471 | | [Fact] |
| | | 472 | | public void WarningTestUndefinedPropertyOnTableCSVW093() |
| | 1 | 473 | | { |
| | 1 | 474 | | var testNumber = "093"; |
| | 1 | 475 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 476 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 477 | | |
| | 1 | 478 | | var warnings = new List<Warning>(); |
| | 1 | 479 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 480 | | warnings, |
| | 1 | 481 | | testFilePath |
| | 1 | 482 | | ); |
| | | 483 | | |
| | 1 | 484 | | Assert.Single(warnings); |
| | | 485 | | |
| | | 486 | | |
| | | 487 | | |
| | 1 | 488 | | } |
| | | 489 | | |
| | | 490 | | [Fact] |
| | | 491 | | public void WarningTestInconsistenArrayValuesTablesCSVW094() |
| | 1 | 492 | | { |
| | 1 | 493 | | var testNumber = "094"; |
| | 1 | 494 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 495 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 496 | | |
| | 1 | 497 | | var warnings = new List<Warning>(); |
| | 1 | 498 | | var tableGroupDescriptor = MetadataParserValidator.ProcessTableGroup( |
| | 1 | 499 | | warnings, |
| | 1 | 500 | | testFilePath |
| | 1 | 501 | | ); |
| | | 502 | | |
| | 1 | 503 | | Assert.Single(warnings); |
| | 1 | 504 | | Assert.Single(tableGroupDescriptor!.tables!._value!); |
| | | 505 | | |
| | 1 | 506 | | } |
| | | 507 | | |
| | | 508 | | [Fact] |
| | | 509 | | public void WarningTestInconsistenArrayValuesTransofrmationsCSVW095() |
| | 1 | 510 | | { |
| | 1 | 511 | | var testNumber = "095"; |
| | 1 | 512 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 513 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 514 | | |
| | 1 | 515 | | var warnings = new List<Warning>(); |
| | 1 | 516 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 517 | | warnings, |
| | 1 | 518 | | testFilePath |
| | 1 | 519 | | ); |
| | | 520 | | |
| | 1 | 521 | | Assert.Single(warnings); |
| | 1 | 522 | | Assert.Single(tableDescriptor.transformations!._value!); |
| | | 523 | | |
| | | 524 | | |
| | 1 | 525 | | } |
| | | 526 | | |
| | | 527 | | [Fact] |
| | | 528 | | public void WarningTestInconsistenArrayValuesColumnsCSVW096() |
| | 1 | 529 | | { |
| | 1 | 530 | | var testNumber = "096"; |
| | 1 | 531 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 532 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 533 | | |
| | 1 | 534 | | var warnings = new List<Warning>(); |
| | 1 | 535 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 536 | | warnings, |
| | 1 | 537 | | testFilePath |
| | 1 | 538 | | ); |
| | | 539 | | |
| | 1 | 540 | | Assert.Single(warnings); |
| | 1 | 541 | | Assert.Equal(5,tableDescriptor!.tableSchema!._value!.columns!._value!.Count); |
| | | 542 | | |
| | 1 | 543 | | } |
| | | 544 | | |
| | | 545 | | [Fact] |
| | | 546 | | public void WarningTestInconsistenArrayValuesForeignKeysCSVW097() |
| | 1 | 547 | | { |
| | 1 | 548 | | var testNumber = "097"; |
| | 1 | 549 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 550 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 551 | | |
| | 1 | 552 | | var warnings = new List<Warning>(); |
| | 1 | 553 | | var tableGroupDescriptor = MetadataParserValidator.ProcessTableGroup( |
| | 1 | 554 | | warnings, |
| | 1 | 555 | | testFilePath |
| | 1 | 556 | | ); |
| | | 557 | | |
| | 1 | 558 | | Assert.Single(warnings); |
| | 1 | 559 | | Assert.Single(tableGroupDescriptor!.tables!._value![1]!.tableSchema!._value!.foreignKeys!._value!); |
| | | 560 | | |
| | 1 | 561 | | } |
| | | 562 | | |
| | | 563 | | [Fact] |
| | | 564 | | public void WarningTestInconsistenArrayValuesTransformationsCSVW099() |
| | 1 | 565 | | { |
| | 1 | 566 | | var testNumber = "099"; |
| | 1 | 567 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 568 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 569 | | |
| | 1 | 570 | | var warnings = new List<Warning>(); |
| | 1 | 571 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 572 | | warnings, |
| | 1 | 573 | | testFilePath |
| | 1 | 574 | | ); |
| | | 575 | | |
| | 1 | 576 | | Assert.Single(warnings); |
| | 1 | 577 | | Assert.Empty(tableDescriptor!.transformations!._value!); |
| | | 578 | | |
| | 1 | 579 | | } |
| | | 580 | | |
| | | 581 | | [Fact] |
| | | 582 | | public void WarningTestInconsistenArrayValuesColumnsCSVW100() |
| | 1 | 583 | | { |
| | 1 | 584 | | var testNumber = "100"; |
| | 1 | 585 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 586 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 587 | | |
| | 1 | 588 | | var warnings = new List<Warning>(); |
| | 1 | 589 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 590 | | warnings, |
| | 1 | 591 | | testFilePath |
| | 1 | 592 | | ); |
| | | 593 | | |
| | 1 | 594 | | Assert.Single(warnings); |
| | 1 | 595 | | Assert.Empty(tableDescriptor!.tableSchema!._value!.columns!._value!); |
| | | 596 | | |
| | 1 | 597 | | } |
| | | 598 | | |
| | | 599 | | [Fact] |
| | | 600 | | public void WarningTestInconsistenArrayValuesForeignKeysCSVW101() |
| | 1 | 601 | | { |
| | 1 | 602 | | var testNumber = "101"; |
| | 1 | 603 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 604 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 605 | | |
| | 1 | 606 | | var warnings = new List<Warning>(); |
| | 1 | 607 | | var tableGroupDescriptor = MetadataParserValidator.ProcessTableGroup( |
| | 1 | 608 | | warnings, |
| | 1 | 609 | | testFilePath |
| | 1 | 610 | | ); |
| | | 611 | | |
| | 1 | 612 | | Assert.Single(warnings); |
| | 1 | 613 | | Assert.Empty(tableGroupDescriptor!.tables!._value![1]!.tableSchema!._value!.foreignKeys!._value!); |
| | | 614 | | |
| | 1 | 615 | | } |
| | | 616 | | |
| | | 617 | | [Fact] |
| | | 618 | | public void WarningTestInconsistenLinkValueIdCSVW102() |
| | 1 | 619 | | { |
| | 1 | 620 | | var testNumber = "102"; |
| | 1 | 621 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 622 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 623 | | |
| | 1 | 624 | | var warnings = new List<Warning>(); |
| | 1 | 625 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 626 | | warnings, |
| | 1 | 627 | | testFilePath |
| | 1 | 628 | | ); |
| | | 629 | | |
| | 1 | 630 | | Assert.Single(warnings); |
| | 1 | 631 | | Assert.Equal("",tableDescriptor!.id!._value); |
| | | 632 | | |
| | 1 | 633 | | } |
| | | 634 | | |
| | | 635 | | [Fact] |
| | | 636 | | public void WarningTestInconsistenLinkValueUrlCSVW103() |
| | 1 | 637 | | { |
| | 1 | 638 | | var testNumber = "103"; |
| | 1 | 639 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 640 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 641 | | |
| | 1 | 642 | | var warnings = new List<Warning>(); |
| | 1 | 643 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 644 | | warnings, |
| | 1 | 645 | | testFilePath |
| | 1 | 646 | | ); |
| | | 647 | | |
| | 1 | 648 | | Assert.Single(warnings); |
| | 1 | 649 | | Assert.Equal("", tableDescriptor!.url!._value!); |
| | | 650 | | |
| | 1 | 651 | | } |
| | | 652 | | |
| | | 653 | | [Fact] |
| | | 654 | | public void WarningTestInvalidPrimaryKeyCSVW105() |
| | 1 | 655 | | { |
| | 1 | 656 | | var testNumber = "103"; |
| | 1 | 657 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 658 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 659 | | |
| | 1 | 660 | | var warnings = new List<Warning>(); |
| | 1 | 661 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 662 | | warnings, |
| | 1 | 663 | | testFilePath |
| | 1 | 664 | | ); |
| | | 665 | | |
| | 1 | 666 | | Assert.Single(warnings); |
| | | 667 | | |
| | 1 | 668 | | } |
| | | 669 | | [Fact] |
| | | 670 | | public void WarningTestInvalidDialectCSVW106() |
| | 1 | 671 | | { |
| | 1 | 672 | | var testNumber = "106"; |
| | 1 | 673 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 674 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 675 | | |
| | 1 | 676 | | var warnings = new List<Warning>(); |
| | 1 | 677 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 678 | | warnings, |
| | 1 | 679 | | testFilePath |
| | 1 | 680 | | ); |
| | | 681 | | |
| | 1 | 682 | | Assert.Single(warnings); |
| | | 683 | | |
| | 1 | 684 | | } |
| | | 685 | | |
| | | 686 | | [Fact] |
| | | 687 | | public void WarningTestInvalidTableSchemaCSVW107() |
| | 1 | 688 | | { |
| | 1 | 689 | | var testNumber = "107"; |
| | 1 | 690 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 691 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 692 | | |
| | 1 | 693 | | var warnings = new List<Warning>(); |
| | 1 | 694 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 695 | | warnings, |
| | 1 | 696 | | testFilePath |
| | 1 | 697 | | ); |
| | | 698 | | |
| | 1 | 699 | | Assert.Single(warnings); |
| | | 700 | | |
| | 1 | 701 | | } |
| | | 702 | | |
| | | 703 | | [Fact] |
| | | 704 | | public void WarningTestInvalidTitlesValueTypeCSVW111() |
| | 1 | 705 | | { |
| | 1 | 706 | | var testNumber = "111"; |
| | 1 | 707 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 708 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 709 | | |
| | 1 | 710 | | var warnings = new List<Warning>(); |
| | 1 | 711 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 712 | | warnings, |
| | 1 | 713 | | testFilePath |
| | 1 | 714 | | ); |
| | | 715 | | |
| | 1 | 716 | | Assert.Single(warnings); |
| | | 717 | | |
| | 1 | 718 | | } |
| | | 719 | | |
| | | 720 | | [Fact] |
| | | 721 | | public void WarningTestInvalidSuppresOutputValueTypeCSVW113() |
| | 1 | 722 | | { |
| | 1 | 723 | | var testNumber = "113"; |
| | 1 | 724 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 725 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 726 | | |
| | 1 | 727 | | var warnings = new List<Warning>(); |
| | 1 | 728 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 729 | | warnings, |
| | 1 | 730 | | testFilePath |
| | 1 | 731 | | ); |
| | | 732 | | |
| | 1 | 733 | | Assert.Single(warnings); |
| | | 734 | | |
| | 1 | 735 | | } |
| | | 736 | | |
| | | 737 | | [Fact] |
| | | 738 | | public void WarningTestInvalidNameValueTypeCSVW114() |
| | 1 | 739 | | { |
| | 1 | 740 | | var testNumber = "114"; |
| | 1 | 741 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 742 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 743 | | |
| | 1 | 744 | | var warnings = new List<Warning>(); |
| | 1 | 745 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 746 | | warnings, |
| | 1 | 747 | | testFilePath |
| | 1 | 748 | | ); |
| | | 749 | | |
| | 1 | 750 | | Assert.Single(warnings); |
| | | 751 | | |
| | 1 | 752 | | } |
| | | 753 | | |
| | | 754 | | [Fact] |
| | | 755 | | public void WarningTestInvalidVirtualValueTypeCSVW115() |
| | 1 | 756 | | { |
| | 1 | 757 | | var testNumber = "115"; |
| | 1 | 758 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 759 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 760 | | |
| | 1 | 761 | | var warnings = new List<Warning>(); |
| | 1 | 762 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 763 | | warnings, |
| | 1 | 764 | | testFilePath |
| | 1 | 765 | | ); |
| | | 766 | | |
| | 1 | 767 | | Assert.Single(warnings); |
| | | 768 | | |
| | 1 | 769 | | } |
| | | 770 | | |
| | | 771 | | [Fact] |
| | | 772 | | public void WarningTestColumnNamesAsIntegersCSVW129() |
| | 1 | 773 | | { |
| | 1 | 774 | | var testNumber = "129"; |
| | 1 | 775 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 776 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 777 | | |
| | 1 | 778 | | var warnings = new List<Warning>(); |
| | 1 | 779 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 780 | | warnings, |
| | 1 | 781 | | testFilePath |
| | 1 | 782 | | ); |
| | | 783 | | |
| | 1 | 784 | | Assert.Equal(5,warnings.Count); |
| | 1 | 785 | | Assert.Null(tableDescriptor.tableSchema!._value!.columns!._value![0]!.name!); |
| | | 786 | | |
| | 1 | 787 | | } |
| | | 788 | | |
| | | 789 | | |
| | | 790 | | [Fact] |
| | | 791 | | public void WarningTestInvalidColumnNamesCSVW130() |
| | 1 | 792 | | { |
| | 1 | 793 | | var testNumber = "130"; |
| | 1 | 794 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 795 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 796 | | |
| | 1 | 797 | | var warnings = new List<Warning>(); |
| | 1 | 798 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 799 | | warnings, |
| | 1 | 800 | | testFilePath |
| | 1 | 801 | | ); |
| | | 802 | | |
| | 1 | 803 | | Assert.Equal(5, warnings.Count); |
| | 1 | 804 | | Assert.Null(tableDescriptor.tableSchema!._value!.columns!._value![0]!.name!); |
| | | 805 | | |
| | 1 | 806 | | } |
| | | 807 | | |
| | | 808 | | [Fact] |
| | | 809 | | public void WarningTestInvalidColumnNameStartingWithUnderscoreCSVW131() |
| | 1 | 810 | | { |
| | 1 | 811 | | var testNumber = "131"; |
| | 1 | 812 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 813 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 814 | | |
| | 1 | 815 | | var warnings = new List<Warning>(); |
| | 1 | 816 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 817 | | warnings, |
| | 1 | 818 | | testFilePath |
| | 1 | 819 | | ); |
| | | 820 | | |
| | 1 | 821 | | Assert.Equal(5, warnings.Count); |
| | | 822 | | |
| | 1 | 823 | | } |
| | | 824 | | |
| | | 825 | | [Fact] |
| | | 826 | | public void WarningTestNonBuiltInDatatypeDatatypeValueCSVW150() |
| | 1 | 827 | | { |
| | 1 | 828 | | var testNumber = "150"; |
| | 1 | 829 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 830 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 831 | | |
| | 1 | 832 | | var warnings = new List<Warning>(); |
| | 1 | 833 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 834 | | warnings, |
| | 1 | 835 | | testFilePath |
| | 1 | 836 | | ); |
| | | 837 | | |
| | 1 | 838 | | Assert.Single(warnings); |
| | | 839 | | |
| | 1 | 840 | | } |
| | | 841 | | |
| | | 842 | | [Fact] |
| | | 843 | | public void WarningTestNonBuiltInDatatypeBaseValueCSVW151() |
| | 1 | 844 | | { |
| | 1 | 845 | | var testNumber = "151"; |
| | 1 | 846 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 847 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 848 | | |
| | 1 | 849 | | var warnings = new List<Warning>(); |
| | 1 | 850 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 851 | | warnings, |
| | 1 | 852 | | testFilePath |
| | 1 | 853 | | ); |
| | | 854 | | |
| | 1 | 855 | | Assert.Single(warnings); |
| | | 856 | | |
| | 1 | 857 | | } |
| | | 858 | | |
| | | 859 | | [Fact] |
| | | 860 | | public void WarningTestStringFormatBadFormatStringCSVW153() |
| | 1 | 861 | | { |
| | 1 | 862 | | var testNumber = "153"; |
| | 1 | 863 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 864 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 865 | | |
| | 1 | 866 | | var warnings = new List<Warning>(); |
| | 1 | 867 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 868 | | warnings, |
| | 1 | 869 | | testFilePath |
| | 1 | 870 | | ); |
| | | 871 | | |
| | 1 | 872 | | Assert.Single(warnings); |
| | | 873 | | |
| | 1 | 874 | | } |
| | | 875 | | |
| | | 876 | | |
| | | 877 | | [Fact] |
| | | 878 | | public void WarningTestNumberFormatBadFormatStringCSVW156() |
| | 1 | 879 | | { |
| | 1 | 880 | | var testNumber = "153"; |
| | 1 | 881 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 882 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 883 | | |
| | 1 | 884 | | var warnings = new List<Warning>(); |
| | 1 | 885 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 886 | | warnings, |
| | 1 | 887 | | testFilePath |
| | 1 | 888 | | ); |
| | | 889 | | |
| | 1 | 890 | | Assert.Single(warnings); |
| | | 891 | | |
| | 1 | 892 | | } |
| | | 893 | | |
| | | 894 | | [Fact] |
| | | 895 | | public void WarningTestNumberFormatBadFormatStringCSVW159() |
| | 1 | 896 | | { |
| | 1 | 897 | | var testNumber = "159"; |
| | 1 | 898 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 899 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 900 | | |
| | 1 | 901 | | var warnings = new List<Warning>(); |
| | 1 | 902 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 903 | | warnings, |
| | 1 | 904 | | testFilePath |
| | 1 | 905 | | ); |
| | | 906 | | |
| | 1 | 907 | | Assert.Single(warnings); |
| | | 908 | | |
| | 1 | 909 | | } |
| | | 910 | | |
| | | 911 | | [Fact] |
| | | 912 | | public void WarningTestBooleanFormatBadFormatStringCSVW184() |
| | 1 | 913 | | { |
| | 1 | 914 | | var testNumber = "184"; |
| | 1 | 915 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 916 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 917 | | |
| | 1 | 918 | | var warnings = new List<Warning>(); |
| | 1 | 919 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 920 | | warnings, |
| | 1 | 921 | | testFilePath |
| | 1 | 922 | | ); |
| | | 923 | | |
| | 1 | 924 | | Assert.Single(warnings); |
| | | 925 | | |
| | 1 | 926 | | } |
| | | 927 | | |
| | | 928 | | [Fact] |
| | | 929 | | public void WarningTestDateFormatBadFormatStringCSVW191() |
| | 1 | 930 | | { |
| | 1 | 931 | | var testNumber = "191"; |
| | 1 | 932 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 933 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 934 | | |
| | 1 | 935 | | var warnings = new List<Warning>(); |
| | 1 | 936 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 937 | | warnings, |
| | 1 | 938 | | testFilePath |
| | 1 | 939 | | ); |
| | | 940 | | |
| | 1 | 941 | | Assert.Single(warnings); |
| | | 942 | | |
| | 1 | 943 | | } |
| | | 944 | | |
| | | 945 | | [Fact] |
| | | 946 | | public void WarningTestDatatypeValueAnAbsoluteURLMustBeOfBuiltInTypeCSVW238() |
| | 1 | 947 | | { |
| | 1 | 948 | | var testNumber = "238"; |
| | 1 | 949 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 950 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 951 | | |
| | 1 | 952 | | var warnings = new List<Warning>(); |
| | 1 | 953 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 954 | | warnings, |
| | 1 | 955 | | testFilePath |
| | 1 | 956 | | ); |
| | | 957 | | |
| | 1 | 958 | | Assert.Single(warnings); |
| | | 959 | | |
| | 1 | 960 | | } |
| | | 961 | | |
| | | 962 | | [Fact] |
| | | 963 | | public void WarningTestNullContainsInvalidValueCSVW266() |
| | 1 | 964 | | { |
| | 1 | 965 | | var testNumber = "266"; |
| | 1 | 966 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 967 | | string jsonString = File.ReadAllText(testFilePath); |
| | | 968 | | |
| | 1 | 969 | | var warnings = new List<Warning>(); |
| | 1 | 970 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 971 | | warnings, |
| | 1 | 972 | | testFilePath |
| | 1 | 973 | | ); |
| | | 974 | | |
| | 1 | 975 | | Assert.Single(warnings); |
| | | 976 | | |
| | 1 | 977 | | } |
| | | 978 | | |
| | | 979 | | [Fact] |
| | | 980 | | public void WarningTestBadFormatStringForBooleansCSVW269() |
| | 1 | 981 | | { |
| | 1 | 982 | | var testNumber = "269"; |
| | 1 | 983 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 984 | | var warnings = new List<Warning>(); |
| | 1 | 985 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 986 | | warnings, |
| | 1 | 987 | | testFilePath |
| | 1 | 988 | | ); |
| | | 989 | | |
| | 1 | 990 | | Assert.Single(warnings); |
| | 1 | 991 | | } |
| | | 992 | | |
| | | 993 | | [Fact] |
| | | 994 | | public void WarningTestBadFormatStringForBooleansCSVW270() |
| | 1 | 995 | | { |
| | 1 | 996 | | var testNumber = "270"; |
| | 1 | 997 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 998 | | var warnings = new List<Warning>(); |
| | 1 | 999 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 1000 | | warnings, |
| | 1 | 1001 | | testFilePath |
| | 1 | 1002 | | ); |
| | | 1003 | | |
| | 1 | 1004 | | Assert.Single(warnings); |
| | 1 | 1005 | | } |
| | | 1006 | | [Fact] |
| | | 1007 | | public void WarningTestInvalidPropertyOnTableGroupCSVW275() |
| | 1 | 1008 | | { |
| | 1 | 1009 | | var testNumber = "275"; |
| | 1 | 1010 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 1011 | | var warnings = new List<Warning>(); |
| | 1 | 1012 | | var tableDescriptor = MetadataParserValidator.ProcessTableGroup( |
| | 1 | 1013 | | warnings, |
| | 1 | 1014 | | testFilePath |
| | 1 | 1015 | | ); |
| | | 1016 | | |
| | 1 | 1017 | | Assert.Single(warnings); |
| | 1 | 1018 | | } |
| | | 1019 | | |
| | | 1020 | | [Fact] |
| | | 1021 | | public void WarningTestInvalidPropertyOnTableCSVW276() |
| | 1 | 1022 | | { |
| | 1 | 1023 | | var testNumber = "276"; |
| | 1 | 1024 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 1025 | | var warnings = new List<Warning>(); |
| | 1 | 1026 | | var tableDescriptor = MetadataParserValidator.ProcessTableGroup( |
| | 1 | 1027 | | warnings, |
| | 1 | 1028 | | testFilePath |
| | 1 | 1029 | | ); |
| | | 1030 | | |
| | 1 | 1031 | | Assert.Single(warnings); |
| | 1 | 1032 | | } |
| | | 1033 | | |
| | | 1034 | | [Fact] |
| | | 1035 | | public void WarningTestInvalidPropertyOnColumnCSVW277() |
| | 1 | 1036 | | { |
| | 1 | 1037 | | var testNumber = "277"; |
| | 1 | 1038 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 1039 | | var warnings = new List<Warning>(); |
| | 1 | 1040 | | var tableDescriptor = MetadataParserValidator.ProcessTableGroup( |
| | 1 | 1041 | | warnings, |
| | 1 | 1042 | | testFilePath |
| | 1 | 1043 | | ); |
| | | 1044 | | |
| | 1 | 1045 | | Assert.Single(warnings); |
| | 1 | 1046 | | } |
| | | 1047 | | |
| | | 1048 | | [Fact] |
| | | 1049 | | public void WarningTestInvalidDatatypeNonBuiltInCSVW308() |
| | 1 | 1050 | | { |
| | 1 | 1051 | | var testNumber = "308"; |
| | 1 | 1052 | | var testFilePath = Path.Combine(testFilesDirectory, "test" + testNumber, "test" + testNumber + "-metadata.js |
| | 1 | 1053 | | var warnings = new List<Warning>(); |
| | 1 | 1054 | | var tableDescriptor = MetadataParserValidator.ProcessTable( |
| | 1 | 1055 | | warnings, |
| | 1 | 1056 | | testFilePath |
| | 1 | 1057 | | ); |
| | | 1058 | | |
| | 1 | 1059 | | Assert.Single(warnings); |
| | 1 | 1060 | | } |
| | | 1061 | | |
| | | 1062 | | |
| | | 1063 | | } |
| | | 1064 | | } |