ВУЗ:
Составители:
Рубрика:
ɋɬɟɩɚɧɰɨɜ ȼ.Ⱥ. ɉɪɚɤɬɢɱɟɫɤɚɹ ɪɚɛɨɬɚ ɜ Eclipse 3.2
29
13. ɂɡɦɟɧɢɬɟ ɬɟɥɨ setUp() ɧɚ container= new Vector();
14. container ɢ Vector ɩɨɞɱɟɪɤɢɜɚɸɬɫɹ ɜɵɞɟɥɟɧɢɟɦ ɨɲɢɛɤɢ,
ɩɨɫɤɨɥɶɤɭ ɨɧɢ ɧɟ ɦɨɝɭɬ ɛɵɬɶ ɪɚɡɪɟɲɟɧɵ. ɋɜɟɬɥɨɟ ɩɹɬɧɵɲɤɨ
ɩɨɹɜɥɹɟɬɫɹ ɧɚ ɦɚɪɤɟɪɧɨɣ ɩɥɚɧɤɟ. ɍɫɬɚɧɨɜɢɬɟ ɤɭɪɫɨɪ ɜɧɭɬɪɢ
Vector
ɢ ɧɚɠɦɢɬɟ Ctrl+1 ɢɥɢ ɢɫɩɨɥɶɡɭɣɬɟ Edit > Quick Fix ɢɡ ɦɟɧɸ.
ȼɵɛɟɪɢɬɟ
Import 'Vector' (java.util). ɗɬɨ ɞɨɛɚɜɢɬ ɨɬɫɭɬɫɬɜɭɸɳɟɟ
ɨɛɴɹɜɥɟɧɢɟ ɢɦɩɨɪɬɚ.
ɍɫɬɚɧɨɜɢɬɟ ɤɭɪɫɨɪ ɜɧɭɬɪɢ container ɢ ɧɚɠɦɢɬɟ Ctrl+1. ȼɵɛɟɪɢɬɟ
Create field 'container', ɱɬɨɛɵ ɞɨɛɚɜɢɬɶ ɧɨɜɨɟ ɩɨɥɟ.
15. ȼ ɩɪɟɞɫɬɚɜɥɟɧɢɢ Outline ɜɵɛɟɪɢɬɟ ɤɥɚɫɫ
MyTestCase. Ɉɬɤɪɨɣɬɟ
ɤɨɧɬɟɤɫɬɧɨɟ ɦɟɧɸ ɢ ɜɵɛɟɪɢɬɟ Source > Generate Getter and Setter...
ɋɬɟɩɚɧɰɨɜ ȼ.Ⱥ. ɉɪɚɤɬɢɱɟɫɤɚɹ ɪɚɛɨɬɚ ɜ Eclipse 3.2
13. ɂɡɦɟɧɢɬɟ ɬɟɥɨ setUp() ɧɚ container= new Vector();
14. container ɢ Vector ɩɨɞɱɟɪɤɢɜɚɸɬɫɹ ɜɵɞɟɥɟɧɢɟɦ ɨɲɢɛɤɢ,
ɩɨɫɤɨɥɶɤɭ ɨɧɢ ɧɟ ɦɨɝɭɬ ɛɵɬɶ ɪɚɡɪɟɲɟɧɵ. ɋɜɟɬɥɨɟ ɩɹɬɧɵɲɤɨ
ɩɨɹɜɥɹɟɬɫɹ ɧɚ ɦɚɪɤɟɪɧɨɣ ɩɥɚɧɤɟ. ɍɫɬɚɧɨɜɢɬɟ ɤɭɪɫɨɪ ɜɧɭɬɪɢ Vector
ɢ ɧɚɠɦɢɬɟ Ctrl+1 ɢɥɢ ɢɫɩɨɥɶɡɭɣɬɟ Edit > Quick Fix ɢɡ ɦɟɧɸ.
ȼɵɛɟɪɢɬɟ Import 'Vector' (java.util). ɗɬɨ ɞɨɛɚɜɢɬ ɨɬɫɭɬɫɬɜɭɸɳɟɟ
ɨɛɴɹɜɥɟɧɢɟ ɢɦɩɨɪɬɚ.
ɍɫɬɚɧɨɜɢɬɟ ɤɭɪɫɨɪ ɜɧɭɬɪɢ container ɢ ɧɚɠɦɢɬɟ Ctrl+1. ȼɵɛɟɪɢɬɟ
Create field 'container', ɱɬɨɛɵ ɞɨɛɚɜɢɬɶ ɧɨɜɨɟ ɩɨɥɟ.
15. ȼ ɩɪɟɞɫɬɚɜɥɟɧɢɢ Outline ɜɵɛɟɪɢɬɟ ɤɥɚɫɫ MyTestCase. Ɉɬɤɪɨɣɬɟ
ɤɨɧɬɟɤɫɬɧɨɟ ɦɟɧɸ ɢ ɜɵɛɟɪɢɬɟ Source > Generate Getter and Setter...
29
Страницы
- « первая
- ‹ предыдущая
- …
- 27
- 28
- 29
- 30
- 31
- …
- следующая ›
- последняя »
