ВУЗ:
Составители:
Рубрика:
ɋɬɟɩɚɧɰɨɜ ȼ.Ⱥ. ɉɪɚɤɬɢɱɟɫɤɚɹ ɪɚɛɨɬɚ ɜ Eclipse 3.2
26
4. ɑɬɨɛɵ ɩɪɟɞɜɚɪɢɬɟɥɶɧɨ ɩɪɨɫɦɨɬɪɟɬɶ ɢɡɦɟɧɟɧɢɹ ɧɚɠɦɢɬɟ Preview>.
ɋɬɪɚɧɢɰɚ ɩɪɟɞɜɚɪɢɬɟɥɶɧɨɝɨ ɩɪɨɫɦɨɬɪɚ ɨɬɨɛɪɚɠɚɟɬ ɢɡɦɟɧɟɧɢɹ,
ɤɨɬɨɪɵɟ ɛɭɞɭɬ ɫɞɟɥɚɧɵ. ɇɚɠɦɢɬɟ OK, ɱɬɨɛɵ ɜɵɞɟɥɢɬɶ ɦɟɬɨɞ.
5. ɉɟɪɟɣɞɢɬɟ ɜ ɜɵɞɟɥɟɧɧɵɣ ɦɟɬɨɞ ɜɵɛɨɪɨɦ ɟɝɨ ɜ ɩɪɟɞɫɬɚɜɥɟɧɢɢ
Outline.
3.9. ɋɨɡɞɚɧɢɟ ɤɥɚɫɫɚ Java
Ⱦɚɥɟɟ ɫɨɡɞɚɞɢɦ ɤɥɚɫɫ Java ɢ ɞɨɛɚɜɢɦ ɦɟɬɨɞɵ, ɢɫɩɨɥɶɡɭɹ ɞɟɣɫɬɜɢɹ
ɝɟɧɟɪɚɰɢɢ ɤɨɞɚ.
1. ȼ ɩɪɟɞɫɬɚɜɥɟɧɢɢ Package Explorer ɜɵɛɟɪɢɬɟ ɩɪɨɟɤɬ
JUnit. ɂɡ
ɤɨɧɬɟɤɫɬɧɨɝɨ ɦɟɧɸ ɩɪɨɟɤɬɚ ɜɵɛɟɪɢɬɟ New > Package ɢɥɢ ɳɟɥɤɧɢɬɟ
ɧɚ ɤɧɨɩɤɟ New Java Package ɜ ɩɚɧɟɥɢ ɢɧɫɬɪɭɦɟɧɬɨɜ.
2. ȼ ɩɨɥɟ Name ɜɜɟɞɢɬɟ ɢɦɹ ɧɨɜɨɝɨ ɩɚɤɟɬɚ
test. Ɂɚɬɟɦ ɳɟɥɤɧɢɬɟ ɧɚ
Finish.
3. ȼ ɩɪɟɞɫɬɚɜɥɟɧɢɢ Package Explorer ɜɵɛɟɪɢɬɟ ɧɨɜɵɣ ɩɚɤɟɬ
test ɢ
ɳɟɥɤɧɢɬɟ ɧɚ ɤɧɨɩɤɟ New Java Class ɜ ɩɚɧɟɥɢ ɢɧɫɬɪɭɦɟɧɬɨɜ.
4. ɍɛɟɞɢɬɟɫɶ, ɱɬɨ
JUnit ɩɨɹɜɥɹɟɬɫɹ ɜ ɩɨɥɟ Source Folder ɢɱɬɨtest
ɩɨɹɜɥɹɟɬɫɹ ɜ ɩɨɥɟ Package. ȼ ɩɨɥɟ Name ɜɜɟɞɢɬɟ MyTestCase.
ɋɬɟɩɚɧɰɨɜ ȼ.Ⱥ. ɉɪɚɤɬɢɱɟɫɤɚɹ ɪɚɛɨɬɚ ɜ Eclipse 3.2
4. ɑɬɨɛɵ ɩɪɟɞɜɚɪɢɬɟɥɶɧɨ ɩɪɨɫɦɨɬɪɟɬɶ ɢɡɦɟɧɟɧɢɹ ɧɚɠɦɢɬɟ Preview>.
ɋɬɪɚɧɢɰɚ ɩɪɟɞɜɚɪɢɬɟɥɶɧɨɝɨ ɩɪɨɫɦɨɬɪɚ ɨɬɨɛɪɚɠɚɟɬ ɢɡɦɟɧɟɧɢɹ,
ɤɨɬɨɪɵɟ ɛɭɞɭɬ ɫɞɟɥɚɧɵ. ɇɚɠɦɢɬɟ OK, ɱɬɨɛɵ ɜɵɞɟɥɢɬɶ ɦɟɬɨɞ.
5. ɉɟɪɟɣɞɢɬɟ ɜ ɜɵɞɟɥɟɧɧɵɣ ɦɟɬɨɞ ɜɵɛɨɪɨɦ ɟɝɨ ɜ ɩɪɟɞɫɬɚɜɥɟɧɢɢ
Outline.
3.9. ɋɨɡɞɚɧɢɟ ɤɥɚɫɫɚ Java
Ⱦɚɥɟɟ ɫɨɡɞɚɞɢɦ ɤɥɚɫɫ Java ɢ ɞɨɛɚɜɢɦ ɦɟɬɨɞɵ, ɢɫɩɨɥɶɡɭɹ ɞɟɣɫɬɜɢɹ
ɝɟɧɟɪɚɰɢɢ ɤɨɞɚ.
1. ȼ ɩɪɟɞɫɬɚɜɥɟɧɢɢ Package Explorer ɜɵɛɟɪɢɬɟ ɩɪɨɟɤɬ JUnit. ɂɡ
ɤɨɧɬɟɤɫɬɧɨɝɨ ɦɟɧɸ ɩɪɨɟɤɬɚ ɜɵɛɟɪɢɬɟ New > Package ɢɥɢ ɳɟɥɤɧɢɬɟ
ɧɚ ɤɧɨɩɤɟ New Java Package ɜ ɩɚɧɟɥɢ ɢɧɫɬɪɭɦɟɧɬɨɜ.
2. ȼ ɩɨɥɟ Name ɜɜɟɞɢɬɟ ɢɦɹ ɧɨɜɨɝɨ ɩɚɤɟɬɚ test. Ɂɚɬɟɦ ɳɟɥɤɧɢɬɟ ɧɚ
Finish.
3. ȼ ɩɪɟɞɫɬɚɜɥɟɧɢɢ Package Explorer ɜɵɛɟɪɢɬɟ ɧɨɜɵɣ ɩɚɤɟɬ test ɢ
ɳɟɥɤɧɢɬɟ ɧɚ ɤɧɨɩɤɟ New Java Class ɜ ɩɚɧɟɥɢ ɢɧɫɬɪɭɦɟɧɬɨɜ.
4. ɍɛɟɞɢɬɟɫɶ, ɱɬɨ JUnit ɩɨɹɜɥɹɟɬɫɹ ɜ ɩɨɥɟ Source Folder ɢ ɱɬɨ test
ɩɨɹɜɥɹɟɬɫɹ ɜ ɩɨɥɟ Package. ȼ ɩɨɥɟ Name ɜɜɟɞɢɬɟ MyTestCase.
26
Страницы
- « первая
- ‹ предыдущая
- …
- 24
- 25
- 26
- 27
- 28
- …
- следующая ›
- последняя »
