254 | | * A ・・・【1】 |
---|
255 | | * ├─A → (内部走査しない ∵自身) |
---|
256 | | * │ |
---|
257 | | * ├─B ・・・『2』 |
---|
258 | | * │ │ |
---|
259 | | * │ ├─A → (内部走査しない ∵既に【1】で走査済み) |
---|
260 | | * │ │ |
---|
261 | | * │ ├─B → (内部走査しない ∵自身) |
---|
262 | | * │ │ |
---|
263 | | * │ ├─C ・・・《3》 |
---|
264 | | * │ │ │ |
---|
265 | | * │ │ ├─A → (内部走査しない ∵既に【1】で走査済み) |
---|
266 | | * │ │ │ |
---|
267 | | * │ │ ├─B → (内部走査しない ∵既に『2』で走査済み) |
---|
268 | | * │ │ │ |
---|
269 | | * │ │ ├─C → (内部走査しない ∵自身) |
---|
270 | | * │ │ │ |
---|
271 | | * │ │ ├─Wrap → (内部走査終了可能) |
---|
272 | | * │ │ │ |
---|
273 | | * │ │ ├─A[] → (内部走査しない ∵既に【1】で走査済み) |
---|
274 | | * │ │ │ |
---|
275 | | * │ │ ├─B[] → (内部走査しない ∵既に『2』で走査済み) |
---|
276 | | * │ │ │ |
---|
277 | | * │ │ └─C[] → (内部走査しない ∵既に《3》で走査済み) |
---|
278 | | * │ │ |
---|
279 | | * │ ├─A[] → (内部走査しない ∵既に【1】で走査済み) |
---|
280 | | * │ │ |
---|
281 | | * │ ├─B[] → (内部走査しない ∵既に『2』で走査済み) |
---|
282 | | * │ │ |
---|
283 | | * │ └─C[] → (内部走査しない ∵既に《3》で走査済み) |
---|
284 | | * │ |
---|
285 | | * ├─A[] → (内部走査しない ∵既に【1】で走査済み) |
---|
286 | | * │ |
---|
287 | | * └─B[] → (内部走査しない ∵既に『2』で走査済み) |
---|
| 292 | * function createTestData(){ |
---|
| 293 | * load('jssp/script/api/soap_client_helper'); |
---|
| 294 | * |
---|
| 295 | * var beanType = "org.intra_mart.jssp.util.JavaScriptUtilityTestModelA"; |
---|
| 296 | * var bean = Packages.org.intra_mart.jssp.util.JavaScriptUtility.newInstanceFilledProperty(beanType, "hoge"); |
---|
| 297 | * var obj = Packages.org.intra_mart.jssp.util.JavaScriptUtility.convertJavaBeans2JsObject(bean); |
---|
| 298 | * obj = normalize(obj); |
---|
| 299 | * Debug.console(obj); |
---|
| 300 | * } |
---|
| 301 | * </pre> |
---|
| 302 | * |
---|
| 303 | * <pre> |
---|
| 304 | * 0: ========== 1 ========== |
---|
| 305 | * 1: /* Object <JavaScriptUtilityTestModelA> */ |
---|
| 306 | * 2: { |
---|
| 307 | * 3: /* Null <JavaScriptUtilityTestModelA> */ |
---|
| 308 | * 4: "modelA" : null, |
---|
| 309 | * 5: |
---|
| 310 | * 6: /* Object <JavaScriptUtilityTestModelB> */ |
---|
| 311 | * 7: "modelB" : { |
---|
| 312 | * 8: /* Null <JavaScriptUtilityTestModelA> */ |
---|
| 313 | * 9: "modelA" : null, |
---|
| 314 | * 10: |
---|
| 315 | * 11: /* Null <JavaScriptUtilityTestModelB> */ |
---|
| 316 | * 12: "modelB" : null, |
---|
| 317 | * 13: |
---|
| 318 | * 14: /* Object <JavaScriptUtilityTestModelC> */ |
---|
| 319 | * 15: "modelC" : { |
---|
| 320 | * 16: /* Null <JavaScriptUtilityTestModelA> */ |
---|
| 321 | * 17: "modelA" : null, |
---|
| 322 | * 18: |
---|
| 323 | * 19: /* Number */ |
---|
| 324 | * 20: "valueWrapperNumberModelC" : 123, |
---|
| 325 | * 21: |
---|
| 326 | * 22: /* Null <JavaScriptUtilityTestModelB> */ |
---|
| 327 | * 23: "modelB" : null, |
---|
| 328 | * 24: |
---|
| 329 | * 25: /* Null <JavaScriptUtilityTestModelC> */ |
---|
| 330 | * 26: "modelC" : null, |
---|
| 331 | * 27: |
---|
| 332 | * 28: /* Array <JavaScriptUtilityTestModelA[]> */ |
---|
| 333 | * 29: "modelArrayA" : [ |
---|
| 334 | * 30: |
---|
| 335 | * 31: ], |
---|
| 336 | * 32: |
---|
| 337 | * 33: /* Array <JavaScriptUtilityTestModelB[]> */ |
---|
| 338 | * 34: "modelArrayB" : [ |
---|
| 339 | * 35: |
---|
| 340 | * 36: ], |
---|
| 341 | * 37: |
---|
| 342 | * 38: /* Boolean */ |
---|
| 343 | * 39: "valueWrapperBooleanModelC" : true, |
---|
| 344 | * 40: |
---|
| 345 | * 41: /* Array <JavaScriptUtilityTestModelC[]> */ |
---|
| 346 | * 42: "modelArrayC" : [ |
---|
| 347 | * 43: |
---|
| 348 | * 44: ], |
---|
| 349 | * 45: |
---|
| 350 | * 46: /* String */ |
---|
| 351 | * 47: "valueWrapperStringModelC" : "prop_valueWrapperStringModelC", |
---|
| 352 | * 48: |
---|
| 353 | * 49: /* Date // Thu Jun 19 2008 12:34:56 GMT+0900 (JST) */ |
---|
| 354 | * 50: "valueWrapperDateModelC" : new Date(1213846496000) |
---|
| 355 | * 51: }, |
---|
| 356 | * 52: |
---|
| 357 | * 53: /* Array <JavaScriptUtilityTestModelA[]> */ |
---|
| 358 | * 54: "modelArrayA" : [ |
---|
| 359 | * 55: |
---|
| 360 | * 56: ], |
---|
| 361 | * 57: |
---|
| 362 | * 58: /* Array <JavaScriptUtilityTestModelB[]> */ |
---|
| 363 | * 59: "modelArrayB" : [ |
---|
| 364 | * 60: |
---|
| 365 | * 61: ], |
---|
| 366 | * 62: |
---|
| 367 | * 63: /* Boolean */ |
---|
| 368 | * 64: "valueWrapperBooleanModelB" : true, |
---|
| 369 | * 65: |
---|
| 370 | * 66: /* Array <JavaScriptUtilityTestModelC[]> */ |
---|
| 371 | * 67: "modelArrayC" : [ |
---|
| 372 | * 68: |
---|
| 373 | * 69: ], |
---|
| 374 | * 70: |
---|
| 375 | * 71: /* String */ |
---|
| 376 | * 72: "valueWrapperStringModelB" : "prop_valueWrapperStringModelB", |
---|
| 377 | * 73: |
---|
| 378 | * 74: /* Date // Thu Jun 19 2008 12:34:56 GMT+0900 (JST) */ |
---|
| 379 | * 75: "valueWrapperDateModelB" : new Date(1213846496000), |
---|
| 380 | * 76: |
---|
| 381 | * 77: /* Number */ |
---|
| 382 | * 78: "valueWrapperNumberModelB" : 123 |
---|
| 383 | * 79: }, |
---|
| 384 | * 80: |
---|
| 385 | * 81: /* Boolean */ |
---|
| 386 | * 82: "valueWrapperBooleanModelA" : true, |
---|
| 387 | * 83: |
---|
| 388 | * 84: /* Array <JavaScriptUtilityTestModelA[]> */ |
---|
| 389 | * 85: "modelArrayA" : [ |
---|
| 390 | * 86: |
---|
| 391 | * 87: ], |
---|
| 392 | * 88: |
---|
| 393 | * 89: /* Array <JavaScriptUtilityTestModelB[]> */ |
---|
| 394 | * 90: "modelArrayB" : [ |
---|
| 395 | * 91: |
---|
| 396 | * 92: ], |
---|
| 397 | * 93: |
---|
| 398 | * 94: /* String */ |
---|
| 399 | * 95: "valueWrapperStringModelA" : "prop_valueWrapperStringModelA", |
---|
| 400 | * 96: |
---|
| 401 | * 97: /* Date // Thu Jun 19 2008 12:34:56 GMT+0900 (JST) */ |
---|
| 402 | * 98: "valueWrapperDateModelA" : new Date(1213846496000), |
---|
| 403 | * 99: |
---|
| 404 | * 100: /* Number */ |
---|
| 405 | * 101: "valueWrapperNumberModelA" : 123 |
---|
| 406 | * 102: } |
---|
| 407 | * </pre> |
---|
| 408 | * |
---|
| 409 | * @throws Exception |
---|
| 410 | */ |
---|
| 411 | public void testConvertJavaBeans2JsObject_JavaBeans() throws Exception { |
---|
| 412 | // 可逆性あり! |
---|
| 413 | JavaScriptUtilityTestModelA testData = |
---|
| 414 | (JavaScriptUtilityTestModelA)JavaScriptUtility.newInstanceFilledProperty(JavaScriptUtilityTestModelA.class, null); |
---|
| 415 | |
---|
| 416 | Object actual = JavaScriptUtility.convertJavaBeans2JsObject(testData); |
---|
| 417 | |
---|
| 418 | assertEquals(ValueObject.class, actual.getClass()); |
---|
| 419 | ValueObject jsObj = (ValueObject)actual; |
---|
| 420 | |
---|
| 421 | String propName; |
---|
| 422 | String expected; |
---|
| 423 | String actualString; |
---|
| 424 | Object actualValue; |
---|
| 425 | |
---|
| 426 | |
---|
| 427 | // 1行目 |
---|
| 428 | propName = ""; |
---|
| 429 | expected = JavaScriptUtilityTestModelA.class.getSimpleName(); |
---|
| 430 | actualString = (String) jsObj.get("__javaClassName_" + propName + "__", jsObj); |
---|
| 431 | assertEquals(expected, actualString); |
---|
| 432 | |
---|
| 433 | // 3行目 |
---|
| 434 | propName = "modelA"; |
---|
| 435 | expected = JavaScriptUtilityTestModelA.class.getSimpleName(); |
---|
| 436 | actualString = (String) jsObj.get("__javaClassName_" + propName + "__", jsObj); |
---|
| 437 | assertEquals(expected, actualString); |
---|
| 438 | |
---|
| 439 | // 4行目 |
---|
| 440 | assertEquals(null, jsObj.get(propName, jsObj)); |
---|
| 441 | |
---|
| 442 | // 6行目 |
---|
| 443 | propName = "modelB"; |
---|
| 444 | expected = JavaScriptUtilityTestModelB.class.getSimpleName(); |
---|
| 445 | actualString = (String) jsObj.get("__javaClassName_" + propName + "__", jsObj); |
---|
| 446 | assertEquals(expected, actualString); |
---|
| 447 | |
---|
| 448 | // 7行目 |
---|
| 449 | Object modelB = jsObj.get("modelB", jsObj); |
---|
| 450 | assertNotNull(modelB); |
---|
| 451 | assertEquals(ValueObject.class, modelB.getClass()); |
---|
| 452 | ValueObject jsModelB = (ValueObject)modelB; |
---|
| 453 | |
---|
| 454 | // 8行目 |
---|
| 455 | propName = "modelA"; |
---|
| 456 | expected = JavaScriptUtilityTestModelA.class.getSimpleName(); |
---|
| 457 | actualString = (String) jsModelB.get("__javaClassName_" + propName + "__", jsModelB); |
---|
| 458 | assertEquals(expected, actualString); |
---|
| 459 | |
---|
| 460 | // 9行目 |
---|
| 461 | assertEquals(null, jsModelB.get(propName, jsObj)); |
---|
| 462 | |
---|
| 463 | // 11行目 |
---|
| 464 | propName = "modelB"; |
---|
| 465 | expected = JavaScriptUtilityTestModelB.class.getSimpleName(); |
---|
| 466 | actualString = (String) jsModelB.get("__javaClassName_" + propName + "__", jsModelB); |
---|
| 467 | assertEquals(expected, actualString); |
---|
| 468 | |
---|
| 469 | // 12行目 |
---|
| 470 | assertEquals(null, jsModelB.get(propName, jsObj)); |
---|
| 471 | |
---|
| 472 | // 14行目 |
---|
| 473 | propName = "modelC"; |
---|
| 474 | expected = JavaScriptUtilityTestModelC.class.getSimpleName(); |
---|
| 475 | actualString = (String) jsModelB.get("__javaClassName_" + propName + "__", jsObj); |
---|
| 476 | assertEquals(expected, actualString); |
---|
| 477 | |
---|
| 478 | // 15行目 |
---|
| 479 | Object modelC = jsModelB.get("modelC", jsModelB); |
---|
| 480 | assertNotNull(modelC); |
---|
| 481 | assertEquals(ValueObject.class, modelC.getClass()); |
---|
| 482 | ValueObject jsModelC = (ValueObject)modelC; |
---|
| 483 | |
---|
| 484 | // 16行目 |
---|
| 485 | propName = "modelA"; |
---|
| 486 | expected = JavaScriptUtilityTestModelA.class.getSimpleName(); |
---|
| 487 | actualString = (String) jsModelC.get("__javaClassName_" + propName + "__", jsModelC); |
---|
| 488 | assertEquals(expected, actualString); |
---|
| 489 | |
---|
| 490 | // 17行目 |
---|
| 491 | assertEquals(null, jsModelC.get(propName, jsObj)); |
---|
| 492 | |
---|
| 493 | // 20行目 |
---|
| 494 | actualValue = jsModelC.get("valueWrapperNumberModelC", jsModelC); |
---|
| 495 | assertEquals(Double.class, actualValue.getClass()); |
---|
| 496 | assertEquals(new Double(123), actualValue); |
---|
| 497 | |
---|
| 498 | // 22行目 |
---|
| 499 | propName = "modelB"; |
---|
| 500 | expected = JavaScriptUtilityTestModelB.class.getSimpleName(); |
---|
| 501 | actualString = (String) jsModelC.get("__javaClassName_" + propName + "__", jsModelC); |
---|
| 502 | assertEquals(expected, actualString); |
---|
| 503 | |
---|
| 504 | // 23行目 |
---|
| 505 | assertEquals(null, jsModelC.get(propName, jsObj)); |
---|
| 506 | |
---|
| 507 | // 25行目 |
---|
| 508 | propName = "modelC"; |
---|
| 509 | expected = JavaScriptUtilityTestModelC.class.getSimpleName(); |
---|
| 510 | actualString = (String) jsModelC.get("__javaClassName_" + propName + "__", jsModelC); |
---|
| 511 | assertEquals(expected, actualString); |
---|
| 512 | |
---|
| 513 | // 26行目 |
---|
| 514 | assertEquals(null, jsModelC.get(propName, jsObj)); |
---|
| 515 | |
---|
| 516 | // 28行目 |
---|
| 517 | propName = "modelArrayA"; |
---|
| 518 | expected = JavaScriptUtilityTestModelA[].class.getSimpleName(); |
---|
| 519 | actualString = (String) jsModelC.get("__javaClassName_" + propName + "__", jsModelC); |
---|
| 520 | assertEquals(expected, actualString); |
---|
| 521 | |
---|
| 522 | // 29行目 |
---|
| 523 | Object modelArrayA = jsModelC.get("modelArrayA", jsModelC); |
---|
| 524 | assertNotNull(modelArrayA); |
---|
| 525 | assertEquals(NativeArray.class, modelArrayA.getClass()); |
---|
| 526 | NativeArray jsModelArrayA = (NativeArray)modelArrayA; |
---|
| 527 | assertEquals(0, jsModelArrayA.getLength()); |
---|
| 528 | |
---|
| 529 | // 33行目 |
---|
| 530 | propName = "modelArrayB"; |
---|
| 531 | expected = JavaScriptUtilityTestModelB[].class.getSimpleName(); |
---|
| 532 | actualString = (String) jsModelC.get("__javaClassName_" + propName + "__", jsModelC); |
---|
| 533 | assertEquals(expected, actualString); |
---|
| 534 | |
---|
| 535 | // 34行目 |
---|
| 536 | Object modelArrayB = jsModelC.get("modelArrayB", jsModelC); |
---|
| 537 | assertNotNull(modelArrayB); |
---|
| 538 | assertEquals(NativeArray.class, modelArrayB.getClass()); |
---|
| 539 | NativeArray jsModelArrayB = (NativeArray)modelArrayB; |
---|
| 540 | assertEquals(0, jsModelArrayB.getLength()); |
---|
| 541 | |
---|
| 542 | // 39行目 |
---|
| 543 | Object valueWrapperBooleanModelC = jsModelC.get("valueWrapperBooleanModelC", jsModelC); |
---|
| 544 | assertNotNull(valueWrapperBooleanModelC); |
---|
| 545 | assertEquals(true, valueWrapperBooleanModelC); |
---|
| 546 | |
---|
| 547 | // 41行目 |
---|
| 548 | propName = "modelArrayC"; |
---|
| 549 | expected = JavaScriptUtilityTestModelC[].class.getSimpleName(); |
---|
| 550 | actualString = (String) jsModelC.get("__javaClassName_" + propName + "__", jsModelC); |
---|
| 551 | assertEquals(expected, actualString); |
---|
| 552 | |
---|
| 553 | // 42行目 |
---|
| 554 | Object modelArrayC = jsModelC.get("modelArrayC", jsModelC); |
---|
| 555 | assertNotNull(modelArrayC); |
---|
| 556 | assertEquals(NativeArray.class, modelArrayC.getClass()); |
---|
| 557 | NativeArray jsModelArrayC = (NativeArray)modelArrayC; |
---|
| 558 | assertEquals(0, jsModelArrayC.getLength()); |
---|
| 559 | |
---|
| 560 | // 47行目 |
---|
| 561 | Object valueWrapperStringModelC = jsModelC.get("valueWrapperStringModelC", jsModelC); |
---|
| 562 | assertNotNull(valueWrapperStringModelC); |
---|
| 563 | assertEquals("prop_valueWrapperStringModelC", valueWrapperStringModelC); |
---|
| 564 | |
---|
| 565 | // 50行目 |
---|
| 566 | Object valueWrapperDateModelC = jsModelC.get("valueWrapperDateModelC", jsModelC); |
---|
| 567 | assertNotNull(valueWrapperDateModelC); |
---|
| 568 | Date date = (Date)Context.jsToJava(valueWrapperDateModelC, Date.class); |
---|
| 569 | assertEquals(new Date(1213846496000L), date); // Thu Jun 19 2008 12:34:56 GMT+0900 (JST) */ |
---|
| 570 | |
---|
| 571 | // 53行目 |
---|
| 572 | propName = "modelArrayA"; |
---|
| 573 | expected = JavaScriptUtilityTestModelA[].class.getSimpleName(); |
---|
| 574 | actualString = (String) jsModelB.get("__javaClassName_" + propName + "__", jsModelB); |
---|
| 575 | assertEquals(expected, actualString); |
---|
| 576 | |
---|
| 577 | // 54行目 |
---|
| 578 | modelArrayA = jsModelB.get("modelArrayA", jsModelB); |
---|
| 579 | assertNotNull(modelArrayA); |
---|
| 580 | assertEquals(NativeArray.class, modelArrayA.getClass()); |
---|
| 581 | jsModelArrayA = (NativeArray)modelArrayA; |
---|
| 582 | assertEquals(0, jsModelArrayA.getLength()); |
---|
| 583 | |
---|
| 584 | // 58行目 |
---|
| 585 | propName = "modelArrayB"; |
---|
| 586 | expected = JavaScriptUtilityTestModelB[].class.getSimpleName(); |
---|
| 587 | actualString = (String) jsModelB.get("__javaClassName_" + propName + "__", jsModelB); |
---|
| 588 | assertEquals(expected, actualString); |
---|
| 589 | |
---|
| 590 | // 59行目 |
---|
| 591 | modelArrayB = jsModelB.get("modelArrayB", jsModelB); |
---|
| 592 | assertNotNull(modelArrayB); |
---|
| 593 | assertEquals(NativeArray.class, modelArrayB.getClass()); |
---|
| 594 | jsModelArrayB = (NativeArray)modelArrayB; |
---|
| 595 | assertEquals(0, jsModelArrayB.getLength()); |
---|
| 596 | |
---|
| 597 | // 63行目 |
---|
| 598 | Object valueWrapperBooleanModelB = jsModelB.get("valueWrapperBooleanModelB", jsModelB); |
---|
| 599 | assertNotNull(valueWrapperBooleanModelB); |
---|
| 600 | assertEquals(true, valueWrapperBooleanModelB); |
---|
| 601 | |
---|
| 602 | // 66行目 |
---|
| 603 | propName = "modelArrayC"; |
---|
| 604 | expected = JavaScriptUtilityTestModelC[].class.getSimpleName(); |
---|
| 605 | actualString = (String) jsModelB.get("__javaClassName_" + propName + "__", jsModelB); |
---|
| 606 | assertEquals(expected, actualString); |
---|
| 607 | |
---|
| 608 | // 67行目 |
---|
| 609 | modelArrayC = jsModelB.get("modelArrayC", jsModelB); |
---|
| 610 | assertNotNull(modelArrayC); |
---|
| 611 | assertEquals(NativeArray.class, modelArrayC.getClass()); |
---|
| 612 | jsModelArrayC = (NativeArray)modelArrayC; |
---|
| 613 | assertEquals(0, jsModelArrayC.getLength()); |
---|
| 614 | |
---|
| 615 | // 72行目 |
---|
| 616 | Object valueWrapperStringModelB = jsModelB.get("valueWrapperStringModelB", jsModelB); |
---|
| 617 | assertNotNull(valueWrapperStringModelB); |
---|
| 618 | assertEquals("prop_valueWrapperStringModelB", valueWrapperStringModelB); |
---|
| 619 | |
---|
| 620 | // 75行目 |
---|
| 621 | Object valueWrapperDateModelB = jsModelB.get("valueWrapperDateModelB", jsModelB); |
---|
| 622 | assertNotNull(valueWrapperDateModelB); |
---|
| 623 | date = (Date)Context.jsToJava(valueWrapperDateModelB, Date.class); |
---|
| 624 | assertEquals(new Date(1213846496000L), date); // Thu Jun 19 2008 12:34:56 GMT+0900 (JST) */ |
---|
| 625 | |
---|
| 626 | // 78行目 |
---|
| 627 | Object valueWrapperNumberModelB = jsModelB.get("valueWrapperNumberModelB", jsModelB); |
---|
| 628 | assertNotNull(valueWrapperNumberModelB); |
---|
| 629 | assertEquals(Double.class, valueWrapperNumberModelB.getClass()); |
---|
| 630 | assertEquals(new Double(123), valueWrapperNumberModelB); |
---|
| 631 | |
---|
| 632 | // 82行目 |
---|
| 633 | Object valueWrapperBooleanModelA = jsObj.get("valueWrapperBooleanModelA", jsObj); |
---|
| 634 | assertNotNull(valueWrapperBooleanModelA); |
---|
| 635 | assertEquals(true, valueWrapperBooleanModelA); |
---|
| 636 | |
---|
| 637 | // 84行目 |
---|
| 638 | propName = "modelArrayA"; |
---|
| 639 | expected = JavaScriptUtilityTestModelA[].class.getSimpleName(); |
---|
| 640 | actualString = (String) jsObj.get("__javaClassName_" + propName + "__", jsObj); |
---|
| 641 | assertEquals(expected, actualString); |
---|
| 642 | |
---|
| 643 | // 85行目 |
---|
| 644 | modelArrayA = jsObj.get("modelArrayA", jsObj); |
---|
| 645 | assertNotNull(modelArrayA); |
---|
| 646 | assertEquals(NativeArray.class, modelArrayA.getClass()); |
---|
| 647 | jsModelArrayA = (NativeArray)modelArrayA; |
---|
| 648 | assertEquals(0, jsModelArrayA.getLength()); |
---|
| 649 | |
---|
| 650 | |
---|
| 651 | // 89行目 |
---|
| 652 | propName = "modelArrayB"; |
---|
| 653 | expected = JavaScriptUtilityTestModelB[].class.getSimpleName(); |
---|
| 654 | actualString = (String) jsObj.get("__javaClassName_" + propName + "__", jsObj); |
---|
| 655 | assertEquals(expected, actualString); |
---|
| 656 | |
---|
| 657 | // 90行目 |
---|
| 658 | modelArrayB = jsObj.get("modelArrayB", jsObj); |
---|
| 659 | assertNotNull(modelArrayB); |
---|
| 660 | assertEquals(NativeArray.class, modelArrayB.getClass()); |
---|
| 661 | jsModelArrayB = (NativeArray)modelArrayB; |
---|
| 662 | assertEquals(0, jsModelArrayB.getLength()); |
---|
| 663 | |
---|
| 664 | // 95行目 |
---|
| 665 | Object valueWrapperStringModelA = jsObj.get("valueWrapperStringModelA", jsObj); |
---|
| 666 | assertNotNull(valueWrapperStringModelA); |
---|
| 667 | assertEquals("prop_valueWrapperStringModelA", valueWrapperStringModelA); |
---|
| 668 | |
---|
| 669 | // 98行目 |
---|
| 670 | Object valueWrapperDateModelA = jsObj.get("valueWrapperDateModelA", jsObj); |
---|
| 671 | assertNotNull(valueWrapperDateModelA); |
---|
| 672 | Date dateValueWrapperDateModelA = (Date)Context.jsToJava(valueWrapperDateModelA, Date.class); |
---|
| 673 | assertEquals(new Date(1213846496000L), dateValueWrapperDateModelA); // Thu Jun 19 2008 12:34:56 GMT+0900 (JST) */ |
---|
| 674 | |
---|
| 675 | // 101行目 |
---|
| 676 | Object valueWrapperNumberModelA = jsObj.get("valueWrapperNumberModelA", jsObj); |
---|
| 677 | assertNotNull(valueWrapperNumberModelA); |
---|
| 678 | assertEquals(Double.class, valueWrapperNumberModelA.getClass()); |
---|
| 679 | assertEquals(new Double(123), valueWrapperNumberModelA); |
---|
| 680 | } |
---|
| 681 | |
---|
| 682 | public void testConvertJsObject2JavaBeansObjectString_正常系_プリミティブ型_char() throws Exception { |
---|
| 683 | String type = char.class.getName(); |
---|
| 684 | Object actual = JavaScriptUtility.convertJsObject2JavaBeans("12345", type); |
---|
| 685 | |
---|
| 686 | assertEquals(Character.class, actual.getClass()); |
---|
| 687 | assertEquals(new Character('1'), actual); |
---|
| 688 | } |
---|
| 689 | |
---|
| 690 | public void testConvertJsObject2JavaBeansObjectString_正常系_プリミティブ型_char_オブジェクトがNumber() throws Exception { |
---|
| 691 | String type = char.class.getName(); |
---|
| 692 | |
---|
| 693 | Object actual = JavaScriptUtility.convertJsObject2JavaBeans(new Double(54321), type); |
---|
| 694 | assertEquals(Character.class, actual.getClass()); |
---|
| 695 | assertEquals(new Character('5'), actual); |
---|
| 696 | } |
---|
| 697 | |
---|
| 698 | public void testConvertJsObject2JavaBeansObjectString_正常系_プリミティブ型_char_オブジェクトがBoolean() throws Exception { |
---|
| 699 | String type = char.class.getName(); |
---|
| 700 | |
---|
| 701 | Object actual = JavaScriptUtility.convertJsObject2JavaBeans(true, type); |
---|
| 702 | assertEquals(Character.class, actual.getClass()); |
---|
| 703 | assertEquals(new Character('t'), actual); |
---|
| 704 | } |
---|
| 705 | |
---|
| 706 | public void testConvertJsObject2JavaBeansObjectString_正常系_プリミティブ型_char_オブジェクトがnull() throws Exception { |
---|
| 707 | String type = char.class.getName(); |
---|
| 708 | |
---|
| 709 | Object actual = JavaScriptUtility.convertJsObject2JavaBeans(null, type); |
---|
| 710 | assertNull(actual); |
---|
| 711 | } |
---|
| 712 | |
---|
| 713 | public void testConvertJsObject2JavaBeansObjectString_正常系_プリミティブ型_double() throws Exception { |
---|
| 714 | String type = double.class.getName(); |
---|
| 715 | Object actual = JavaScriptUtility.convertJsObject2JavaBeans(12345, type); |
---|
| 716 | |
---|
| 717 | assertEquals(Double.class, actual.getClass()); |
---|
| 718 | assertEquals(new Double(12345), actual); |
---|
| 719 | } |
---|
| 720 | |
---|
| 721 | public void testConvertJsObject2JavaBeansObjectString_異常系_プリミティブ型_double() throws Exception { |
---|
| 722 | String type = double.class.getName(); |
---|
| 723 | |
---|
| 724 | try{ |
---|
| 725 | JavaScriptUtility.convertJsObject2JavaBeans("文字列です", type); |
---|
| 726 | } |
---|
| 727 | catch(NumberFormatException e){ |
---|
| 728 | assertTrue("NumberFormatExceptionが起こること", true); |
---|
| 729 | return; |
---|
| 730 | } |
---|
| 731 | |
---|
| 732 | fail("NumberFormatExceptionが起こっていません"); |
---|
| 733 | } |
---|
| 734 | |
---|
| 735 | public void testConvertJsObject2JavaBeansObjectString_正常系_プリミティブ型_float() throws Exception { |
---|
| 736 | String type = float.class.getName(); |
---|
| 737 | Object actual = JavaScriptUtility.convertJsObject2JavaBeans(12345, type); |
---|
| 738 | |
---|
| 739 | assertEquals(Float.class, actual.getClass()); |
---|
| 740 | assertEquals(new Float(12345), actual); |
---|
| 741 | } |
---|
| 742 | |
---|
| 743 | public void testConvertJsObject2JavaBeansObjectString_異常系_プリミティブ型_float() throws Exception { |
---|
| 744 | String type = float.class.getName(); |
---|
| 745 | |
---|
| 746 | try{ |
---|
| 747 | JavaScriptUtility.convertJsObject2JavaBeans("文字列です", type); |
---|
| 748 | } |
---|
| 749 | catch(NumberFormatException e){ |
---|
| 750 | assertTrue("NumberFormatExceptionが起こること", true); |
---|
| 751 | return; |
---|
| 752 | } |
---|
| 753 | |
---|
| 754 | fail("NumberFormatExceptionが起こっていません"); |
---|
| 755 | } |
---|
| 756 | |
---|
| 757 | public void testConvertJsObject2JavaBeansObjectString_正常系_プリミティブ型_long() throws Exception { |
---|
| 758 | String type = long.class.getName(); |
---|
| 759 | Object actual = JavaScriptUtility.convertJsObject2JavaBeans(12345, type); |
---|
| 760 | |
---|
| 761 | assertEquals(Long.class, actual.getClass()); |
---|
| 762 | assertEquals(new Long(12345), actual); |
---|
| 763 | } |
---|
| 764 | |
---|
| 765 | public void testConvertJsObject2JavaBeansObjectString_異常系_プリミティブ型_long() throws Exception { |
---|
| 766 | String type = long.class.getName(); |
---|
| 767 | |
---|
| 768 | try{ |
---|
| 769 | JavaScriptUtility.convertJsObject2JavaBeans("文字列です", type); |
---|
| 770 | } |
---|
| 771 | catch(NumberFormatException e){ |
---|
| 772 | assertTrue("NumberFormatExceptionが起こること", true); |
---|
| 773 | return; |
---|
| 774 | } |
---|
| 775 | |
---|
| 776 | fail("NumberFormatExceptionが起こっていません"); |
---|
| 777 | } |
---|
| 778 | |
---|
| 779 | public void testConvertJsObject2JavaBeansObjectString_正常系_プリミティブ型_int() throws Exception { |
---|
| 780 | String type = int.class.getName(); |
---|
| 781 | Object actual = JavaScriptUtility.convertJsObject2JavaBeans(12345, type); |
---|
| 782 | |
---|
| 783 | assertEquals(Integer.class, actual.getClass()); |
---|
| 784 | assertEquals(new Integer(12345), actual); |
---|
| 785 | } |
---|
| 786 | |
---|
| 787 | public void testConvertJsObject2JavaBeansObjectString_異常系_プリミティブ型_int() throws Exception { |
---|
| 788 | String type = int.class.getName(); |
---|
| 789 | |
---|
| 790 | try{ |
---|
| 791 | JavaScriptUtility.convertJsObject2JavaBeans("文字列です", type); |
---|
| 792 | } |
---|
| 793 | catch(NumberFormatException e){ |
---|
| 794 | assertTrue("NumberFormatExceptionが起こること", true); |
---|
| 795 | return; |
---|
| 796 | } |
---|
| 797 | |
---|
| 798 | fail("NumberFormatExceptionが起こっていません"); |
---|
| 799 | } |
---|
| 800 | |
---|
| 801 | public void testConvertJsObject2JavaBeansObjectString_正常系_プリミティブ型_short() throws Exception { |
---|
| 802 | String type = short.class.getName(); |
---|
| 803 | Object actual = JavaScriptUtility.convertJsObject2JavaBeans(12345, type); |
---|
| 804 | |
---|
| 805 | assertEquals(Short.class, actual.getClass()); |
---|
| 806 | assertEquals(new Short("12345"), actual); |
---|
| 807 | } |
---|
| 808 | |
---|
| 809 | public void testConvertJsObject2JavaBeansObjectString_異常系_プリミティブ型_short() throws Exception { |
---|
| 810 | String type = short.class.getName(); |
---|
| 811 | |
---|
| 812 | try{ |
---|
| 813 | JavaScriptUtility.convertJsObject2JavaBeans("文字列です", type); |
---|
| 814 | } |
---|
| 815 | catch(NumberFormatException e){ |
---|
| 816 | assertTrue("NumberFormatExceptionが起こること", true); |
---|
| 817 | return; |
---|
| 818 | } |
---|
| 819 | |
---|
| 820 | fail("NumberFormatExceptionが起こっていません"); |
---|
| 821 | } |
---|
| 822 | |
---|
| 823 | public void testConvertJsObject2JavaBeansObjectString_正常系_プリミティブ型_byte() throws Exception { |
---|
| 824 | String type = byte.class.getName(); |
---|
| 825 | Object actual = JavaScriptUtility.convertJsObject2JavaBeans(123, type); |
---|
| 826 | |
---|
| 827 | assertEquals(Byte.class, actual.getClass()); |
---|
| 828 | assertEquals(new Byte("123"), actual); |
---|
| 829 | } |
---|
| 830 | |
---|
| 831 | public void testConvertJsObject2JavaBeansObjectString_異常系_プリミティブ型_byte() throws Exception { |
---|
| 832 | String type = byte.class.getName(); |
---|
| 833 | |
---|
| 834 | try{ |
---|
| 835 | JavaScriptUtility.convertJsObject2JavaBeans("文字列です", type); |
---|
| 836 | } |
---|
| 837 | catch(NumberFormatException e){ |
---|
| 838 | assertTrue("NumberFormatExceptionが起こること", true); |
---|
| 839 | return; |
---|
| 840 | } |
---|
| 841 | |
---|
| 842 | fail("NumberFormatExceptionが起こっていません"); |
---|
| 843 | } |
---|
| 844 | |
---|
| 845 | |
---|
| 846 | public void testConvertJsObject2JavaBeansObjectStringClassLoader() throws Exception { |
---|
| 847 | assertTrue("JavaScriptUtility.convertJsObject2JavaBeans(Object, String)系のテストが通っていればOK", true); |
---|
| 848 | } |
---|
| 849 | |
---|
| 850 | public void testConvertJsObject2JavaBeansObjectClassOfQ() throws Exception { |
---|
| 851 | // 可逆性あり! |
---|
| 852 | JavaScriptUtilityTestModelA expected = (JavaScriptUtilityTestModelA)JavaScriptUtility.newInstanceFilledProperty(JavaScriptUtilityTestModelA.class, null); |
---|
| 853 | Object jsObject = JavaScriptUtility.convertJavaBeans2JsObject(expected); |
---|
| 854 | |
---|
| 855 | Object actual = JavaScriptUtility.convertJsObject2JavaBeans(jsObject, JavaScriptUtilityTestModelA.class); |
---|
| 856 | assertEquals(JavaScriptUtilityTestModelA.class, actual.getClass()); |
---|
| 857 | |
---|
| 858 | JavaScriptUtilityTestModelA actualModelA = (JavaScriptUtilityTestModelA) actual; |
---|
| 859 | |
---|
| 860 | assertEquals(null, actualModelA.getModelA()); |
---|
| 861 | assertEquals( expected.getModelA(), |
---|
| 862 | actualModelA.getModelA()); |
---|
| 863 | |
---|
| 864 | assertEquals(null, actualModelA.getModelB().getModelA()); |
---|
| 865 | assertEquals( expected.getModelB().getModelA(), |
---|
| 866 | actualModelA.getModelB().getModelA()); |
---|
| 867 | |
---|
| 868 | assertEquals(null, actualModelA.getModelB().getModelB()); |
---|
| 869 | assertEquals( expected.getModelB().getModelA(), |
---|
| 870 | actualModelA.getModelB().getModelB()); |
---|
| 871 | |
---|
| 872 | assertEquals(null, actualModelA.getModelB().getModelC().getModelA()); |
---|
| 873 | assertEquals( expected.getModelB().getModelC().getModelA(), |
---|
| 874 | actualModelA.getModelB().getModelC().getModelA()); |
---|
| 875 | |
---|
| 876 | assertEquals(new Double(123), actualModelA.getModelB().getModelC().getValueWrapperNumberModelC()); |
---|
| 877 | assertEquals( expected.getModelB().getModelC().getValueWrapperNumberModelC(), |
---|
| 878 | actualModelA.getModelB().getModelC().getValueWrapperNumberModelC()); |
---|
| 879 | |
---|
| 880 | assertEquals(null, actualModelA.getModelB().getModelC().getModelB()); |
---|
| 881 | assertEquals( expected.getModelB().getModelC().getModelB(), |
---|
| 882 | actualModelA.getModelB().getModelC().getModelB()); |
---|
| 883 | |
---|
| 884 | assertEquals(null, actualModelA.getModelB().getModelC().getModelC()); |
---|
| 885 | assertEquals( expected.getModelB().getModelC().getModelC(), |
---|
| 886 | actualModelA.getModelB().getModelC().getModelC()); |
---|
| 887 | |
---|
| 888 | assertEquals(0, actualModelA.getModelB().getModelC().getModelArrayA().length); |
---|
| 889 | assertEquals( expected.getModelB().getModelC().getModelArrayA().length, |
---|
| 890 | actualModelA.getModelB().getModelC().getModelArrayA().length); |
---|
| 891 | |
---|
| 892 | assertEquals(0, actualModelA.getModelB().getModelC().getModelArrayB().length); |
---|
| 893 | assertEquals( expected.getModelB().getModelC().getModelArrayB().length, |
---|
| 894 | actualModelA.getModelB().getModelC().getModelArrayB().length); |
---|
| 895 | |
---|
| 896 | assertEquals(Boolean.TRUE, actualModelA.getModelB().getModelC().getValueWrapperBooleanModelC()); |
---|
| 897 | assertEquals( expected.getModelB().getModelC().getValueWrapperBooleanModelC(), |
---|
| 898 | actualModelA.getModelB().getModelC().getValueWrapperBooleanModelC()); |
---|
| 899 | |
---|
| 900 | assertEquals(0, actualModelA.getModelB().getModelC().getModelArrayC().length); |
---|
| 901 | assertEquals( expected.getModelB().getModelC().getModelArrayC().length, |
---|
| 902 | actualModelA.getModelB().getModelC().getModelArrayC().length); |
---|
| 903 | |
---|
| 904 | assertEquals("prop_valueWrapperStringModelC", actualModelA.getModelB().getModelC().getValueWrapperStringModelC()); |
---|
| 905 | assertEquals( expected.getModelB().getModelC().getValueWrapperStringModelC(), |
---|
| 906 | actualModelA.getModelB().getModelC().getValueWrapperStringModelC()); |
---|
| 907 | |
---|
| 908 | assertEquals(new Date(1213846496000L), actualModelA.getModelB().getModelC().getValueWrapperDateModelC()); |
---|
| 909 | assertEquals( expected.getModelB().getModelC().getValueWrapperDateModelC(), |
---|
| 910 | actualModelA.getModelB().getModelC().getValueWrapperDateModelC()); |
---|
| 911 | |
---|
| 912 | assertEquals(0, actualModelA.getModelB().getModelArrayA().length); |
---|
| 913 | assertEquals( expected.getModelB().getModelArrayA().length, |
---|
| 914 | actualModelA.getModelB().getModelArrayA().length); |
---|
| 915 | |
---|
| 916 | assertEquals(0, actualModelA.getModelB().getModelArrayB().length); |
---|
| 917 | assertEquals( expected.getModelB().getModelArrayB().length, |
---|
| 918 | actualModelA.getModelB().getModelArrayB().length); |
---|
| 919 | |
---|
| 920 | assertEquals(Boolean.TRUE, actualModelA.getModelB().getValueWrapperBooleanModelB()); |
---|
| 921 | assertEquals( expected.getModelB().getValueWrapperBooleanModelB(), |
---|
| 922 | actualModelA.getModelB().getValueWrapperBooleanModelB()); |
---|
| 923 | |
---|
| 924 | assertEquals(0, actualModelA.getModelB().getModelArrayC().length); |
---|
| 925 | assertEquals( expected.getModelB().getModelArrayC().length, |
---|
| 926 | actualModelA.getModelB().getModelArrayC().length); |
---|
| 927 | |
---|
| 928 | assertEquals("prop_valueWrapperStringModelB", actualModelA.getModelB().getValueWrapperStringModelB()); |
---|
| 929 | assertEquals( expected.getModelB().getValueWrapperStringModelB(), |
---|
| 930 | actualModelA.getModelB().getValueWrapperStringModelB()); |
---|
| 931 | |
---|
| 932 | assertEquals(new Date(1213846496000L), actualModelA.getModelB().getValueWrapperDateModelB()); |
---|
| 933 | assertEquals( expected.getModelB().getValueWrapperDateModelB(), |
---|
| 934 | actualModelA.getModelB().getValueWrapperDateModelB()); |
---|
| 935 | |
---|
| 936 | assertEquals(new Double(123), actualModelA.getModelB().getValueWrapperNumberModelB()); |
---|
| 937 | assertEquals( expected.getModelB().getValueWrapperNumberModelB(), |
---|
| 938 | actualModelA.getModelB().getValueWrapperNumberModelB()); |
---|
| 939 | |
---|
| 940 | assertEquals(Boolean.TRUE, actualModelA.getValueWrapperBooleanModelA()); |
---|
| 941 | assertEquals( expected.getValueWrapperBooleanModelA(), |
---|
| 942 | actualModelA.getValueWrapperBooleanModelA()); |
---|
| 943 | |
---|
| 944 | assertEquals(0, actualModelA.getModelArrayA().length); |
---|
| 945 | assertEquals( expected.getModelArrayA().length, |
---|
| 946 | actualModelA.getModelArrayA().length); |
---|
| 947 | |
---|
| 948 | assertEquals(0, actualModelA.getModelArrayB().length); |
---|
| 949 | assertEquals( expected.getModelArrayB().length, |
---|
| 950 | actualModelA.getModelArrayB().length); |
---|
| 951 | |
---|
| 952 | assertEquals("prop_valueWrapperStringModelA", actualModelA.getValueWrapperStringModelA()); |
---|
| 953 | assertEquals( expected.getValueWrapperStringModelA(), |
---|
| 954 | actualModelA.getValueWrapperStringModelA()); |
---|
| 955 | |
---|
| 956 | assertEquals(new Date(1213846496000L), actualModelA.getValueWrapperDateModelA()); |
---|
| 957 | assertEquals( expected.getValueWrapperDateModelA(), |
---|
| 958 | actualModelA.getValueWrapperDateModelA()); |
---|
| 959 | |
---|
| 960 | assertEquals(new Double(123), actualModelA.getValueWrapperNumberModelA()); |
---|
| 961 | assertEquals( expected.getValueWrapperNumberModelA(), |
---|
| 962 | actualModelA.getValueWrapperNumberModelA()); |
---|
| 963 | |
---|
| 964 | } |
---|
| 965 | |
---|
| 966 | |
---|
| 967 | public void testGetBeansPropertyMap_対象外_List() throws Exception { |
---|
| 968 | Class beanType = List.class; |
---|
| 969 | Map<String, PropertyDescriptor> actual = JavaScriptUtility.getBeansPropertyMap(beanType); |
---|
| 970 | |
---|
| 971 | assertEquals(0, actual.size()); |
---|
| 972 | } |
---|
| 973 | |
---|
| 974 | public void testGetBeansPropertyMap_対象外_Map() throws Exception { |
---|
| 975 | Class beanType = Map.class; |
---|
| 976 | Map<String, PropertyDescriptor> actual = JavaScriptUtility.getBeansPropertyMap(beanType); |
---|
| 977 | |
---|
| 978 | assertEquals(0, actual.size()); |
---|
| 979 | } |
---|
| 980 | |
---|
| 981 | public void testGetBeansPropertyMap_対象外_Set() throws Exception { |
---|
| 982 | Class beanType = Set.class; |
---|
| 983 | Map<String, PropertyDescriptor> actual = JavaScriptUtility.getBeansPropertyMap(beanType); |
---|
| 984 | |
---|
| 985 | assertEquals(0, actual.size()); |
---|
| 986 | } |
---|
| 987 | |
---|
| 988 | public void testGetBeansPropertyMap_対象外_Object() throws Exception { |
---|
| 989 | Class beanType = Object.class; |
---|
| 990 | Map<String, PropertyDescriptor> actual = JavaScriptUtility.getBeansPropertyMap(beanType); |
---|
| 991 | |
---|
| 992 | assertEquals(0, actual.size()); |
---|
| 993 | } |
---|
| 994 | |
---|
| 995 | public void testGetBeansPropertyMap_対象クラス_JavaScriptUtilityTestModelA() throws Exception { |
---|
| 996 | Class beanType = JavaScriptUtilityTestModelA.class; |
---|
| 997 | Map<String, PropertyDescriptor> actual = JavaScriptUtility.getBeansPropertyMap(beanType); |
---|
| 998 | |
---|
| 999 | assertEquals(8, actual.size()); |
---|
| 1000 | assertNotNull(actual.get("modelA")); |
---|
| 1001 | assertNotNull(actual.get("modelArrayA")); |
---|
| 1002 | assertNotNull(actual.get("modelArrayB")); |
---|
| 1003 | assertNotNull(actual.get("valueWrapperStringModelA")); |
---|
| 1004 | assertNotNull(actual.get("valueWrapperNumberModelA")); |
---|
| 1005 | assertNotNull(actual.get("valueWrapperBooleanModelA")); |
---|
| 1006 | assertNotNull(actual.get("valueWrapperDateModelA")); |
---|
| 1007 | } |
---|
| 1008 | |
---|
| 1009 | |
---|
| 1010 | public void testNewInstanceFilledPropertyStringString_プリミティブ型_char_初期値_null() throws Exception { |
---|
| 1011 | String beanClassName = char.class.getName(); |
---|
| 1012 | String defaultValue = null; |
---|
| 1013 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1014 | |
---|
| 1015 | assertEquals(Character.class, actual.getClass()); |
---|
| 1016 | assertEquals('_', actual); |
---|
| 1017 | } |
---|
| 1018 | |
---|
| 1019 | public void testNewInstanceFilledPropertyStringString_プリミティブ型_char_初期値_空文字() throws Exception { |
---|
| 1020 | String beanClassName = char.class.getName(); |
---|
| 1021 | String defaultValue = ""; |
---|
| 1022 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1023 | |
---|
| 1024 | assertEquals(Character.class, actual.getClass()); |
---|
| 1025 | assertEquals('_', actual); |
---|
| 1026 | } |
---|
| 1027 | |
---|
| 1028 | public void testNewInstanceFilledPropertyStringString_プリミティブ型_char_初期値_任意() throws Exception { |
---|
| 1029 | String beanClassName = char.class.getName(); |
---|
| 1030 | String defaultValue = "任意の文字列"; |
---|
| 1031 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1032 | |
---|
| 1033 | assertEquals(Character.class, actual.getClass()); |
---|
| 1034 | assertEquals('任', actual); |
---|
| 1035 | } |
---|
| 1036 | |
---|
| 1037 | public void testNewInstanceFilledPropertyStringString_プリミティブ型_char_initializeあり_初期値_null() throws Exception { |
---|
| 1038 | JavaScriptUtility.initializeSampleData("テストです。", null, null, null); |
---|
| 1039 | |
---|
| 1040 | String beanClassName = char.class.getName(); |
---|
| 1041 | String defaultValue = null; |
---|
| 1042 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1043 | |
---|
| 1044 | assertEquals(Character.class, actual.getClass()); |
---|
| 1045 | assertEquals('テ', actual); |
---|
| 1046 | } |
---|
| 1047 | |
---|
| 1048 | public void testNewInstanceFilledPropertyStringString_プリミティブ型_double() throws Exception { |
---|
| 1049 | String beanClassName = double.class.getName(); |
---|
| 1050 | String defaultValue = null; |
---|
| 1051 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1052 | |
---|
| 1053 | assertEquals(Double.class, actual.getClass()); |
---|
| 1054 | assertEquals(new Double(123), actual); |
---|
| 1055 | } |
---|
| 1056 | |
---|
| 1057 | public void testNewInstanceFilledPropertyStringString_プリミティブ型_double_initializeあり() throws Exception { |
---|
| 1058 | Double expected = new Double(567.89); |
---|
| 1059 | JavaScriptUtility.initializeSampleData(null, expected, null, null); |
---|
| 1060 | |
---|
| 1061 | String beanClassName = double.class.getName(); |
---|
| 1062 | String defaultValue = null; |
---|
| 1063 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1064 | |
---|
| 1065 | assertEquals(Double.class, actual.getClass()); |
---|
| 1066 | assertEquals(expected, actual); |
---|
| 1067 | } |
---|
| 1068 | |
---|
| 1069 | public void testNewInstanceFilledPropertyStringString_プリミティブ型_float() throws Exception { |
---|
| 1070 | String beanClassName = float.class.getName(); |
---|
| 1071 | String defaultValue = null; |
---|
| 1072 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1073 | |
---|
| 1074 | assertEquals(Float.class, actual.getClass()); |
---|
| 1075 | assertEquals(new Float(123), actual); |
---|
| 1076 | } |
---|
| 1077 | |
---|
| 1078 | public void testNewInstanceFilledPropertyStringString_プリミティブ型_float_initializeあり() throws Exception { |
---|
| 1079 | Float expected = new Float(111.222); |
---|
| 1080 | JavaScriptUtility.initializeSampleData(null, expected, null, null); |
---|
| 1081 | |
---|
| 1082 | String beanClassName = float.class.getName(); |
---|
| 1083 | String defaultValue = null; |
---|
| 1084 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1085 | |
---|
| 1086 | assertEquals(Float.class, actual.getClass()); |
---|
| 1087 | assertEquals(expected, actual); |
---|
| 1088 | } |
---|
| 1089 | |
---|
| 1090 | public void testNewInstanceFilledPropertyStringString_プリミティブ型_long() throws Exception { |
---|
| 1091 | String beanClassName = long.class.getName(); |
---|
| 1092 | String defaultValue = null; |
---|
| 1093 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1094 | |
---|
| 1095 | assertEquals(Long.class, actual.getClass()); |
---|
| 1096 | assertEquals(new Long(123), actual); |
---|
| 1097 | } |
---|
| 1098 | |
---|
| 1099 | public void testNewInstanceFilledPropertyStringString_プリミティブ型_long_initializeあり() throws Exception { |
---|
| 1100 | Long expected = new Long(123456789011L); |
---|
| 1101 | JavaScriptUtility.initializeSampleData(null, expected, null, null); |
---|
| 1102 | |
---|
| 1103 | String beanClassName = long.class.getName(); |
---|
| 1104 | String defaultValue = null; |
---|
| 1105 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1106 | |
---|
| 1107 | assertEquals(Long.class, actual.getClass()); |
---|
| 1108 | assertEquals(expected, actual); |
---|
| 1109 | } |
---|
| 1110 | |
---|
| 1111 | public void testNewInstanceFilledPropertyStringString_プリミティブ型_int() throws Exception { |
---|
| 1112 | String beanClassName = int.class.getName(); |
---|
| 1113 | String defaultValue = null; |
---|
| 1114 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1115 | |
---|
| 1116 | assertEquals(Integer.class, actual.getClass()); |
---|
| 1117 | assertEquals(new Integer(123), actual); |
---|
| 1118 | } |
---|
| 1119 | |
---|
| 1120 | public void testNewInstanceFilledPropertyStringString_プリミティブ型_int_initializeあり() throws Exception { |
---|
| 1121 | Integer expected = new Integer(8786543); |
---|
| 1122 | JavaScriptUtility.initializeSampleData(null, expected, null, null); |
---|
| 1123 | |
---|
| 1124 | String beanClassName = int.class.getName(); |
---|
| 1125 | String defaultValue = null; |
---|
| 1126 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1127 | |
---|
| 1128 | assertEquals(Integer.class, actual.getClass()); |
---|
| 1129 | assertEquals(expected, actual); |
---|
| 1130 | } |
---|
| 1131 | |
---|
| 1132 | public void testNewInstanceFilledPropertyStringString_プリミティブ型_short() throws Exception { |
---|
| 1133 | String beanClassName = short.class.getName(); |
---|
| 1134 | String defaultValue = null; |
---|
| 1135 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1136 | |
---|
| 1137 | assertEquals(Short.class, actual.getClass()); |
---|
| 1138 | assertEquals(new Short("123"), actual); |
---|
| 1139 | } |
---|
| 1140 | |
---|
| 1141 | public void testNewInstanceFilledPropertyStringString_プリミティブ型_short_initializeあり() throws Exception { |
---|
| 1142 | Short expected = new Short("345"); |
---|
| 1143 | JavaScriptUtility.initializeSampleData(null, expected, null, null); |
---|
| 1144 | |
---|
| 1145 | String beanClassName = short.class.getName(); |
---|
| 1146 | String defaultValue = null; |
---|
| 1147 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1148 | |
---|
| 1149 | assertEquals(Short.class, actual.getClass()); |
---|
| 1150 | assertEquals(expected, actual); |
---|
| 1151 | } |
---|
| 1152 | |
---|
| 1153 | public void testNewInstanceFilledPropertyStringString_プリミティブ型_byte() throws Exception { |
---|
| 1154 | String beanClassName = byte.class.getName(); |
---|
| 1155 | String defaultValue = null; |
---|
| 1156 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1157 | |
---|
| 1158 | assertEquals(Byte.class, actual.getClass()); |
---|
| 1159 | assertEquals(new Byte("123"), actual); |
---|
| 1160 | } |
---|
| 1161 | |
---|
| 1162 | public void testNewInstanceFilledPropertyStringString_プリミティブ型_byte_initializeあり() throws Exception { |
---|
| 1163 | Byte expected = new Byte("16"); |
---|
| 1164 | JavaScriptUtility.initializeSampleData(null, expected, null, null); |
---|
| 1165 | |
---|
| 1166 | String beanClassName = byte.class.getName(); |
---|
| 1167 | String defaultValue = null; |
---|
| 1168 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1169 | |
---|
| 1170 | assertEquals(Byte.class, actual.getClass()); |
---|
| 1171 | assertEquals(expected, actual); |
---|
| 1172 | } |
---|
| 1173 | |
---|
| 1174 | public void testNewInstanceFilledPropertyStringString_プリミティブ型_boolean() throws Exception { |
---|
| 1175 | String beanClassName = boolean.class.getName(); |
---|
| 1176 | String defaultValue = null; |
---|
| 1177 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1178 | |
---|
| 1179 | assertEquals(Boolean.class, actual.getClass()); |
---|
| 1180 | assertEquals(Boolean.TRUE, actual); |
---|
| 1181 | } |
---|
| 1182 | |
---|
| 1183 | public void testNewInstanceFilledPropertyStringString_プリミティブ型_initializeあり() throws Exception { |
---|
| 1184 | Boolean expected = Boolean.FALSE; |
---|
| 1185 | JavaScriptUtility.initializeSampleData(null, null, expected, null); |
---|
| 1186 | |
---|
| 1187 | String beanClassName = boolean.class.getName(); |
---|
| 1188 | String defaultValue = null; |
---|
| 1189 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1190 | |
---|
| 1191 | assertEquals(Boolean.class, actual.getClass()); |
---|
| 1192 | assertEquals(expected, actual); |
---|
| 1193 | } |
---|
| 1194 | |
---|
| 1195 | |
---|
| 1196 | public void testNewInstanceFilledPropertyStringString_ラッパークラス_String() throws Exception { |
---|
| 1197 | String beanClassName = String.class.getName(); |
---|
| 1198 | String defaultValue = null; |
---|
| 1199 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1200 | |
---|
| 1201 | assertEquals(String.class, actual.getClass()); |
---|
| 1202 | assertEquals("__default__", actual); |
---|
| 1203 | } |
---|
| 1204 | |
---|
| 1205 | public void testNewInstanceFilledPropertyStringString_ラッパークラス_String_initializeあり() throws Exception { |
---|
| 1206 | String expected = new String("テストしています。"); |
---|
| 1207 | JavaScriptUtility.initializeSampleData(expected, null, null, null); |
---|
| 1208 | |
---|
| 1209 | String beanClassName = String.class.getName(); |
---|
| 1210 | String defaultValue = null; |
---|
| 1211 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1212 | |
---|
| 1213 | assertEquals(String.class, actual.getClass()); |
---|
| 1214 | assertEquals(expected, actual); |
---|
| 1215 | } |
---|
| 1216 | |
---|
| 1217 | public void testNewInstanceFilledPropertyStringString_ラッパークラス_Character() throws Exception { |
---|
| 1218 | String beanClassName = Character.class.getName(); |
---|
| 1219 | String defaultValue = null; |
---|
| 1220 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1221 | |
---|
| 1222 | assertEquals(Character.class, actual.getClass()); |
---|
| 1223 | assertEquals('_', actual); |
---|
| 1224 | } |
---|
| 1225 | |
---|
| 1226 | public void testNewInstanceFilledPropertyStringString_ラッパークラス_Character_initializeあり() throws Exception { |
---|
| 1227 | String expected = new String("はひふへほ"); |
---|
| 1228 | JavaScriptUtility.initializeSampleData(expected, null, null, null); |
---|
| 1229 | |
---|
| 1230 | String beanClassName = Character.class.getName(); |
---|
| 1231 | String defaultValue = null; |
---|
| 1232 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1233 | |
---|
| 1234 | assertEquals(Character.class, actual.getClass()); |
---|
| 1235 | assertEquals(expected.charAt(0), actual); |
---|
| 1236 | } |
---|
| 1237 | |
---|
| 1238 | public void testNewInstanceFilledPropertyStringString_ラッパークラス_Double() throws Exception { |
---|
| 1239 | String beanClassName = Double.class.getName(); |
---|
| 1240 | String defaultValue = null; |
---|
| 1241 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1242 | |
---|
| 1243 | assertEquals(Double.class, actual.getClass()); |
---|
| 1244 | assertEquals(new Double(123), actual); |
---|
| 1245 | } |
---|
| 1246 | |
---|
| 1247 | public void testNewInstanceFilledPropertyStringString_ラッパークラス_Double_initializeあり() throws Exception { |
---|
| 1248 | Double expected = new Double(123); |
---|
| 1249 | JavaScriptUtility.initializeSampleData(null, expected, null, null); |
---|
| 1250 | |
---|
| 1251 | String beanClassName = Double.class.getName(); |
---|
| 1252 | String defaultValue = null; |
---|
| 1253 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1254 | |
---|
| 1255 | assertEquals(Double.class, actual.getClass()); |
---|
| 1256 | assertEquals(expected, actual); |
---|
| 1257 | } |
---|
| 1258 | |
---|
| 1259 | public void testNewInstanceFilledPropertyStringString_ラッパークラス_Float() throws Exception { |
---|
| 1260 | String beanClassName = Float.class.getName(); |
---|
| 1261 | String defaultValue = null; |
---|
| 1262 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1263 | |
---|
| 1264 | assertEquals(Float.class, actual.getClass()); |
---|
| 1265 | assertEquals(new Float(123), actual); |
---|
| 1266 | } |
---|
| 1267 | |
---|
| 1268 | public void testNewInstanceFilledPropertyStringString_ラッパークラス_Float_initializeあり() throws Exception { |
---|
| 1269 | Float expected = new Float(123.456); |
---|
| 1270 | JavaScriptUtility.initializeSampleData(null, expected, null, null); |
---|
| 1271 | |
---|
| 1272 | String beanClassName = Float.class.getName(); |
---|
| 1273 | String defaultValue = null; |
---|
| 1274 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1275 | |
---|
| 1276 | assertEquals(Float.class, actual.getClass()); |
---|
| 1277 | assertEquals(expected, actual); |
---|
| 1278 | } |
---|
| 1279 | |
---|
| 1280 | public void testNewInstanceFilledPropertyStringString_ラッパークラス_Long() throws Exception { |
---|
| 1281 | String beanClassName = Long.class.getName(); |
---|
| 1282 | String defaultValue = null; |
---|
| 1283 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1284 | |
---|
| 1285 | assertEquals(Long.class, actual.getClass()); |
---|
| 1286 | assertEquals(new Long(123), actual); |
---|
| 1287 | } |
---|
| 1288 | |
---|
| 1289 | public void testNewInstanceFilledPropertyStringString_ラッパークラス_Long_initializeあり() throws Exception { |
---|
| 1290 | Long expected = new Long(9876543210L); |
---|
| 1291 | JavaScriptUtility.initializeSampleData(null, expected, null, null); |
---|
| 1292 | |
---|
| 1293 | String beanClassName = Long.class.getName(); |
---|
| 1294 | String defaultValue = null; |
---|
| 1295 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1296 | |
---|
| 1297 | assertEquals(Long.class, actual.getClass()); |
---|
| 1298 | assertEquals(expected, actual); |
---|
| 1299 | } |
---|
| 1300 | |
---|
| 1301 | public void testNewInstanceFilledPropertyStringString_ラッパークラス_Integer() throws Exception { |
---|
| 1302 | String beanClassName = Integer.class.getName(); |
---|
| 1303 | String defaultValue = null; |
---|
| 1304 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1305 | |
---|
| 1306 | assertEquals(Integer.class, actual.getClass()); |
---|
| 1307 | assertEquals(new Integer(123), actual); |
---|
| 1308 | } |
---|
| 1309 | |
---|
| 1310 | public void testNewInstanceFilledPropertyStringString_ラッパークラス_Integer_initializeあり() throws Exception { |
---|
| 1311 | Integer expected = new Integer(7684657); |
---|
| 1312 | JavaScriptUtility.initializeSampleData(null, expected, null, null); |
---|
| 1313 | |
---|
| 1314 | String beanClassName = Integer.class.getName(); |
---|
| 1315 | String defaultValue = null; |
---|
| 1316 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1317 | |
---|
| 1318 | assertEquals(Integer.class, actual.getClass()); |
---|
| 1319 | assertEquals(expected, actual); |
---|
| 1320 | } |
---|
| 1321 | |
---|
| 1322 | public void testNewInstanceFilledPropertyStringString_ラッパークラス_Short() throws Exception { |
---|
| 1323 | String beanClassName = Short.class.getName(); |
---|
| 1324 | String defaultValue = null; |
---|
| 1325 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1326 | |
---|
| 1327 | assertEquals(Short.class, actual.getClass()); |
---|
| 1328 | assertEquals(new Short("123"), actual); |
---|
| 1329 | } |
---|
| 1330 | |
---|
| 1331 | public void testNewInstanceFilledPropertyStringString_ラッパークラス_Short_initializeあり() throws Exception { |
---|
| 1332 | Short expected = new Short("456"); |
---|
| 1333 | JavaScriptUtility.initializeSampleData(null, expected, null, null); |
---|
| 1334 | |
---|
| 1335 | String beanClassName = Short.class.getName(); |
---|
| 1336 | String defaultValue = null; |
---|
| 1337 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1338 | |
---|
| 1339 | assertEquals(Short.class, actual.getClass()); |
---|
| 1340 | assertEquals(expected, actual); |
---|
| 1341 | } |
---|
| 1342 | |
---|
| 1343 | public void testNewInstanceFilledPropertyStringString_ラッパークラス_Byte() throws Exception { |
---|
| 1344 | String beanClassName = Byte.class.getName(); |
---|
| 1345 | String defaultValue = null; |
---|
| 1346 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1347 | |
---|
| 1348 | assertEquals(Byte.class, actual.getClass()); |
---|
| 1349 | assertEquals(new Byte("123"), actual); |
---|
| 1350 | } |
---|
| 1351 | |
---|
| 1352 | public void testNewInstanceFilledPropertyStringString_ラッパークラス_Byte_initializeあり() throws Exception { |
---|
| 1353 | Byte expected = new Byte("23"); |
---|
| 1354 | JavaScriptUtility.initializeSampleData(null, expected, null, null); |
---|
| 1355 | |
---|
| 1356 | String beanClassName = Byte.class.getName(); |
---|
| 1357 | String defaultValue = null; |
---|
| 1358 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1359 | |
---|
| 1360 | assertEquals(Byte.class, actual.getClass()); |
---|
| 1361 | assertEquals(expected, actual); |
---|
| 1362 | } |
---|
| 1363 | |
---|
| 1364 | public void testNewInstanceFilledPropertyStringString_ラッパークラス_Boolean() throws Exception { |
---|
| 1365 | String beanClassName = Boolean.class.getName(); |
---|
| 1366 | String defaultValue = null; |
---|
| 1367 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1368 | |
---|
| 1369 | assertEquals(Boolean.class, actual.getClass()); |
---|
| 1370 | assertEquals(Boolean.TRUE, actual); |
---|
| 1371 | } |
---|
| 1372 | |
---|
| 1373 | public void testNewInstanceFilledPropertyStringString_ラッパークラス_Boolean_initializeあり() throws Exception { |
---|
| 1374 | Boolean expected = Boolean.FALSE; |
---|
| 1375 | JavaScriptUtility.initializeSampleData(null, null, expected, null); |
---|
| 1376 | |
---|
| 1377 | String beanClassName = Boolean.class.getName(); |
---|
| 1378 | String defaultValue = null; |
---|
| 1379 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1380 | |
---|
| 1381 | assertEquals(Boolean.class, actual.getClass()); |
---|
| 1382 | assertEquals(expected, actual); |
---|
| 1383 | } |
---|
| 1384 | |
---|
| 1385 | public void testNewInstanceFilledPropertyStringString_ラッパークラス_Date() throws Exception { |
---|
| 1386 | String beanClassName = Date.class.getName(); |
---|
| 1387 | String defaultValue = null; |
---|
| 1388 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1389 | |
---|
| 1390 | assertEquals(Date.class, actual.getClass()); |
---|
| 1391 | assertEquals(new Date(1213846496000L), actual); // "Mon June 19 2008 12:34:56 GMT+0900 (JST)" |
---|
| 1392 | } |
---|
| 1393 | |
---|
| 1394 | public void testNewInstanceFilledPropertyStringString_ラッパークラス_Date_initializeあり() throws Exception { |
---|
| 1395 | Date expected = new Date(); |
---|
| 1396 | JavaScriptUtility.initializeSampleData(null, null, null, expected); |
---|
| 1397 | |
---|
| 1398 | String beanClassName = Date.class.getName(); |
---|
| 1399 | String defaultValue = null; |
---|
| 1400 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1401 | |
---|
| 1402 | assertEquals(Date.class, actual.getClass()); |
---|
| 1403 | assertEquals(expected, actual); |
---|
| 1404 | } |
---|
| 1405 | |
---|
| 1406 | public void testNewInstanceFilledPropertyStringString_ラッパークラス_Calendar() throws Exception { |
---|
| 1407 | Calendar expected = Calendar.getInstance(); |
---|
| 1408 | expected.setTime(new Date(1213846496000L)); // "Mon June 19 2008 12:34:56 GMT+0900 (JST)" |
---|
| 1409 | |
---|
| 1410 | String beanClassName = Calendar.class.getName(); |
---|
| 1411 | String defaultValue = null; |
---|
| 1412 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1413 | |
---|
| 1414 | assertTrue(actual instanceof Calendar); |
---|
| 1415 | assertEquals(expected, actual); |
---|
| 1416 | } |
---|
| 1417 | |
---|
| 1418 | public void testNewInstanceFilledPropertyStringString_ラッパークラス_Calendar_initializeあり() throws Exception { |
---|
| 1419 | Date date = new Date(); |
---|
| 1420 | JavaScriptUtility.initializeSampleData(null, null, null, date); |
---|
| 1421 | |
---|
| 1422 | Calendar expected = Calendar.getInstance(); |
---|
| 1423 | expected.setTime(date); |
---|
| 1424 | |
---|
| 1425 | String beanClassName = Calendar.class.getName(); |
---|
| 1426 | String defaultValue = null; |
---|
| 1427 | Object actual = JavaScriptUtility.newInstanceFilledProperty(beanClassName, defaultValue); |
---|
| 1428 | |
---|
| 1429 | assertTrue(actual instanceof Calendar); |
---|
| 1430 | assertEquals(expected, actual); |
---|
| 1431 | } |
---|
| 1432 | |
---|
| 1433 | public void testNewInstanceFilledPropertyStringClassLoaderString() throws Exception { |
---|
| 1434 | assertTrue("JavaScriptUtility.newInstanceFilledProperty(String, String)系のテストが通っていればOK", true); |
---|
| 1435 | } |
---|
| 1436 | |
---|
| 1437 | /** |
---|
| 1438 | * <pre> |
---|
| 1439 | * 1: A ・・・① |
---|
| 1440 | * 2: ├─A → (内部走査しない ∵自身) |
---|
| 1441 | * 3: │ |
---|
| 1442 | * 4: ├─B ・・・② |
---|
| 1443 | * 5: │ │ |
---|
| 1444 | * 6: │ ├─A → (内部走査しない ∵既に①で走査済み) |
---|
| 1445 | * 7: │ │ |
---|
| 1446 | * 8: │ ├─B → (内部走査しない ∵自身) |
---|
| 1447 | * 9: │ │ |
---|
| 1448 | * 10: │ ├─C ・・・③ |
---|
| 1449 | * 11: │ │ │ |
---|
| 1450 | * 12: │ │ ├─A → (内部走査しない ∵既に①で走査済み) |
---|
| 1451 | * 13: │ │ │ |
---|
| 1452 | * 14: │ │ ├─B → (内部走査しない ∵既に②で走査済み) |
---|
| 1453 | * 15: │ │ │ |
---|
| 1454 | * 16: │ │ ├─C → (内部走査しない ∵自身) |
---|
| 1455 | * 17: │ │ │ |
---|
| 1456 | * 18: │ │ ├─Wrap → (内部走査終了可能) |
---|
| 1457 | * 19: │ │ │ |
---|
| 1458 | * 20: │ │ ├─A[] → (内部走査しない ∵既に①で走査済み) |
---|
| 1459 | * 21: │ │ │ |
---|
| 1460 | * 22: │ │ ├─B[] → (内部走査しない ∵既に②で走査済み) |
---|
| 1461 | * 23: │ │ │ |
---|
| 1462 | * 24: │ │ └─C[] → (内部走査しない ∵既に③で走査済み) |
---|
| 1463 | * 25: │ │ |
---|
| 1464 | * 26: │ ├─Wrap → (内部走査終了可能) |
---|
| 1465 | * 27: │ │ |
---|
| 1466 | * 28: │ ├─A[] → (内部走査しない ∵既に①で走査済み) |
---|
| 1467 | * 29: │ │ |
---|
| 1468 | * 30: │ ├─B[] → (内部走査しない ∵既に②で走査済み) |
---|
| 1469 | * 31: │ │ |
---|
| 1470 | * 32: │ └─C[] → (内部走査しない ∵既に③で走査済み) |
---|
| 1471 | * 33: │ |
---|
| 1472 | * 34: ├─Wrap → (内部走査終了可能) |
---|
| 1473 | * 35: │ |
---|
| 1474 | * 36: ├─A[] → (内部走査しない ∵既に①で走査済み) |
---|
| 1475 | * 37: │ |
---|
| 1476 | * 38: └─B[] → (内部走査しない ∵既に②で走査済み) |
---|