Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please complete the TODO items in the code below and make the test work, use java 11 only. import static org.junit.Assert.*; import org.junit.After; import org.junit.Before;

Please complete the TODO items in the code below and make the test work, use java 11 only.

import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class TestWordCounter {
// TODO complete this test class
// TODO declare a reference to the SUT (system under test), i.e., WordCounter
@Before
public void setUp() {
// TODO create the SUT instance
}
@After
public void tearDown() {
// TODO set the SUT instance to null
}
@Test
public void testGetCountEmpty() {
// TODO verify that the SUT initially returns an empty map
fail();
}
@Test
public void testGetCountNonEmpty() {
// TODO run the SUT on a specific String iterator with some repeated words,
// then use assertions to verify the correct counts
// do this for at least two words in the iterator and two not in the iterator
fail();
}
}

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

Step: 3

blur-text-image

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

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Sham Navathe

4th Edition

0321122267, 978-0321122261

More Books

Students also viewed these Databases questions

Question

1. How can evolutionary theory explain prosocial behaviour?

Answered: 1 week ago

Question

Describe the seven standard parts of a letter.

Answered: 1 week ago

Question

Explain how to develop effective Internet-based messages.

Answered: 1 week ago

Question

Identify the advantages and disadvantages of written messages.

Answered: 1 week ago