Programming > SOLUTIONS MANUAL > MarbleTest.java Virginia Tech - CS 1114 (All)
import sofia.micro.*; // ------------------------------------------------------------------------- /** * This is a marble test class. * * @author Emily Ashburn (emmily2000) * @version (2019.04.0... 4) */ public class MarbleTest extends TestCase { //~ Fields ................................................................ private Ground ground; private Marble marble; //~ Constructor ........................................................... // ---------------------------------------------------------- /** * Creates a new MarbleTest test object. */ public MarbleTest() { // The constructor is usually empty in unit tests, since it runs // once for the whole class, not once for each test method. // Per-test initialization should be placed in setUp() instead. } //~ Methods ............................................................... // ---------------------------------------------------------- /** * Sets up the test fixture. * Called before every test case method. */ public void setUp() { ground = new Ground(false); marble = new Marble(); ground.add(marble, 6, 6); } // ---------------------------------------------------------- /** * a test for getMarbleAtHeight() */ public void testGetMarbleT() { Marble marvin = new Marble(); ground.add(marvin, 0, 0); assertEquals(marble, marvin.getMarbleAtHeight(6)); } /** * a test for getMarbleAtHeight() when there is no marble at that height */ public void testGetMarbleF() { assertEquals(null, marble.getMarbleAtHeight(0)); } /** [Show More]
Last updated: 2 years ago
Preview 1 out of 3 pages
Buy this document to get the full access instantly
Instant Download Access after purchase
Buy NowInstant download
We Accept:
Can't find what you want? Try our AI powered Search
Connected school, study & course
About the document
Uploaded On
Mar 24, 2021
Number of pages
3
Written in
This document has been written for:
Uploaded
Mar 24, 2021
Downloads
0
Views
95
In Scholarfriends, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Scholarfriends · High quality services·