Junit for the testing the methods for the user inputs

Viewed 23

Junit For Testing. Assert Methods And Annotations in Junit. Solve the question Using assertEquals Method.

public class DailyTasks 
{
    public String doStringConcat(String s1, String s2)
    {
        return s1 + " " + s2;
    }
    public int[] sortValues(int arr[])
    {
        Arrays.sort(arr);
        return arr;
    }
    public boolean checkPresence(String str, String a)
    {
        return str.contains(a);
    }
}
0 Answers
Related