Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can anyone make a code for these tests. import org.junit.jupiter.api.Test; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.equalTo; import static org.junit.jupiter.api.Assertions.*; class LargestNumberGuesserTest extends NumberGuesserTest { @Test

Can anyone make a code for these tests.

import org.junit.jupiter.api.Test;

import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.equalTo; import static org.junit.jupiter.api.Assertions.*;

class LargestNumberGuesserTest extends NumberGuesserTest { @Test void guess() { final LargestNumberGuesser guesser1; final LargestNumberGuesser guesser2;

guesser1 = new LargestNumberGuesser(); guesser2 = new LargestNumberGuesser();

assertThat(guesser1.guess(0, 1000), equalTo(1000)); assertThat(guesser2.guess(0, 1000), equalTo(1000)); assertThat(guesser1.guess(1, 1000), equalTo(1000)); assertThat(guesser2.guess(0, 1000), equalTo(1000)); assertThat(guesser1.guess(2, 1000), equalTo(1000)); assertThat(guesser2.guess(999, 1000), equalTo(1000)); assertThat(guesser1.guess(1000, 1000), equalTo(1000)); assertThat(guesser2.guess(1000, 1000), equalTo(1000)); assertThat(guesser1.guess(1, 1), equalTo(1)); assertThat(guesser2.guess(1, 2), equalTo(2)); assertThat(guesser1.guess(100, 102), equalTo(102)); assertThat(guesser2.guess(100, 103), equalTo(103)); }

@Test void badGuess() { badGuess(new LargestNumberGuesser()); } }

you have to create class to pass this test.

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2018 Dublin Ireland September 10 14 2018 Proceedings Part 1 Lnai 11051

Authors: Michele Berlingerio ,Francesco Bonchi ,Thomas Gartner ,Neil Hurley ,Georgiana Ifrim

1st Edition

3030109240, 978-3030109240

More Books

Students also viewed these Databases questions