Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a class called, LinkedInUserTest. The LinkedInUserTest class contains the JUnit test methods (annotated with @Test). Create unit test methods to test the following: Add,

Create a class called, LinkedInUserTest. The LinkedInUserTest class contains the JUnit test methods (annotated with @Test). Create unit test methods to test the following: Add, retrieve, and delete connections o Create a unit test that creates three LinkedIn users. Assign the first username as han, the second username as luke, and the last username as Leia Make han connect to both Luke and Leia. Assert that han has two connections and that they are luke and Leia, Remove Leia from hans connection list, Assert that han has one connection and that it is like. LinkedIn User Type Create a unit test which creates a LinkedIn user. Call the setType method, passing P for premier. Assert that the getType method returns the text, P Error check adding a connection o Create a unit test which creates two LinkedIn users. Assign the first username as han and the second username as luke Connect han to luke Connect han to luke again Assert that the addConnection method threw a LinkedInException with the message, You are already connected with this user on the second connection attempt between han and luke. Error check removing a connection o Create a unit test which creates three LinkedIn users. Assign the first username as han, the second username as luke, and the last username as Leia Connect han with luke Call the removeConnection method, attempting to remove the connection between han and Leia. Assert that the method throws a LinkedInException with the message, You are NOT connected with this user Sorting Create a unit test which creates three LinkedIn users. Assign the first username as Han, the second username as LUKE, and the last username as Leia (make lukes user name uppercase and Leia's lowercase) Connect han to both LUKE and Leia. Be sure to connect LUKE first and Leia second to test the sort functionality o Call the java.util.Collections.sort method, passing hans connections List to the sort method, Assert that the connections list is sorted alphabetically by user name the First element should be Leia and the second element should be LUKE.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Principles Programming And Performance

Authors: Patrick O'Neil, Elizabeth O'Neil

2nd Edition

1558605800, 978-1558605800

More Books

Students also viewed these Databases questions

Question

What are some metrics for evaluating training and development?

Answered: 1 week ago

Question

Why do managers face having to go through with sunk cost?

Answered: 1 week ago

Question

1. Who should participate and how will participants be recruited?

Answered: 1 week ago