That's so hard.
211606361 Ho Chenghua
211606377 Qin One PA
I. Unit Testing
1. Need to write test code using JUnit plugin
Two. Code
@Test//test whether the passed parameter is correct public void test () {string[] str = {"-grade", "3", "N", "10"}; Assertequals (True, Mathexam6361.jibu (str)); } @Test//test the incoming grade over the range is correct public void test1 () {string[] str = {"-grade", "0", "N", "10"}; Assertequals (False, Mathexam6361.jibu (str)); } @Test//test that the number of incoming questions exceeds the range correctly public void Test2 () {string[] str = {"-grade", "3", "N", "101"}; Assertequals (False, Mathexam6361.jibu (str)); } @Test//test if the passed in parameter exceeds the range correctly public void Test3 () {string[] str = {"-grade", "0", "N", "101"} ; Assertequals (False, Mathexam6361.jibu (str)); } @Test//test whether the passed parameter is negative if the public void Test4 () {string[] str= {"-grade", "1", "N", "10"}; Assertequals (False, Mathexam6361.jibu (str)); } @Test//test incoming grade for decimal is correct public void Test5 () {string[] str = {"-grade", "3.0", "N", "10"}; Assertequals (True, Mathexam6361.jiBu (str)); }
}
Three. Class diagram
Iv. Summary
This is the current progress of the operation, and then I will continue to finish the national day
Math test code for elementary school students