(Solved) : 7131 Design Test Cases State Testing Stringutils Class Contains Reverse Method Signature P Q44129191 . . .
7.13.1. Design Test Cases: State Testing A Stringutils class contains a reverse () method, with a signature as presented below. List test cases, which would verify that this method really reverses the input String! Listing 7.35. Signature of reverse Method public String reverse (String s) {…} 7.13.2. Design Test Cases: Interactions Testing UserService Impl class contains the assignPassword() method, as presented on Listing 7.36. The method uses two collaborators to successfully perform its task: userDAO and securityService. Listing 7.36. assignPassword() method private UserDAO user DAO; private Security Service security Service; public void assignPassword (User user) throws Exception { String passwordMd5 = security Service.md5 (user.getPassword()); user.setPassword (passwordMd5); userDAO. updateUser (user); Design the test cases for this method! Please note that this time you will have to think not only about the input parameters (user), but also about the values returned (or exceptions thrown!) by securityService and userDAO. Show transcribed image text 7.13.1. Design Test Cases: State Testing A Stringutils class contains a reverse () method, with a signature as presented below. List test cases, which would verify that this method really reverses the input String! Listing 7.35. Signature of reverse Method public String reverse (String s) {…} 7.13.2. Design Test Cases: Interactions Testing UserService Impl class contains the assignPassword() method, as presented on Listing 7.36. The method uses two collaborators to successfully perform its task: userDAO and securityService. Listing 7.36. assignPassword() method private UserDAO user DAO; private Security Service security Service; public void assignPassword (User user) throws Exception { String passwordMd5 = security Service.md5 (user.getPassword()); user.setPassword (passwordMd5); userDAO. updateUser (user); Design the test cases for this method! Please note that this time you will have to think not only about the input parameters (user), but also about the values returned (or exceptions thrown!) by securityService and userDAO.
Expert Answer
Answer to 7.13.1. Design Test Cases: State Testing A Stringutils class contains a reverse () method, with a signature as presented…
OR