Question: I need help Black-Box Testing my StudentCollection class. I need the code for the test class to make sure everything passes. (Right clicking the file

I need help Black-Box Testing my StudentCollection class. I need the code for the test class to make sure everything passes. (Right clicking the file StudentCollectionTest in NetBeans and hitting "Test File" should show all Tests Passed. Code in Java.

package studentcollection;

//StudentCollectionTest

import java.util.Iterator; import java.util.NoSuchElementException;

import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test;

import static org.junit.Assert.*;

import student.Student; import studentspec.StudentSpec;

import studentcollection.StudentCollectionSpec.StudentCollectionException;

public class StudentCollectionTest { public StudentCollectionTest() { }

@BeforeClass public static void setUpClass() { }

@AfterClass public static void tearDownClass() { }

@Before public void setUp() { }

@After public void tearDown() { }

@Test public void testGetCapacity() { System.out.println("getCapacity"); studentcollection.StudentCollection instance = new studentcollection.StudentCollection(); int expResult = 0; int result = instance.getCapacity(); assertEquals(expResult, result); }

@Test public void testReset() { System.out.println("reset"); studentcollection.StudentCollection instance = new studentcollection.StudentCollection(); instance.reset(); }

@Test public void testIsFull() { System.out.println("isFull"); studentcollection.StudentCollection instance = new studentcollection.StudentCollection(); boolean expResult = false; boolean result = instance.isFull(); assertEquals(expResult, result);

}

@Test public void testIsEmpty() { System.out.println("isEmpty"); studentcollection.StudentCollection instance = new studentcollection.StudentCollection(); boolean expResult = false; boolean result = instance.isEmpty(); assertEquals(expResult, result); }

@Test public void testGetStudentCount() { System.out.println("getStudentCount"); studentcollection.StudentCollection instance = new studentcollection.StudentCollection(); int expResult = 0; int result = instance.getStudentCount(); assertEquals(expResult, result); }

@Test public void testGetSpacesRemaining() { System.out.println("getSpacesRemaining"); studentcollection.StudentCollection instance = new studentcollection.StudentCollection(); int expResult = 0; int result = instance.getSpacesRemaining(); assertEquals(expResult, result); }

@Test public void testAddStudent() { System.out.println("addStudent"); studentspec.StudentSpec aStudent = null; studentcollection.StudentCollection instance = new studentcollection.StudentCollection(); instance.addStudent(aStudent); }

@Test public void testRetrieveStudentBySID() { System.out.println("retrieveStudentBySID"); java.lang.String sidKey = ""; studentcollection.StudentCollection instance = new studentcollection.StudentCollection(); studentspec.StudentSpec expResult = null; studentspec.StudentSpec result = instance.retrieveStudentBySID(sidKey); assertEquals(expResult, result); }

@Test public void testRemoveStudentBySID() { System.out.println("removeStudentBySID"); java.lang.String sidKey = ""; studentcollection.StudentCollection instance = new studentcollection.StudentCollection(); studentspec.StudentSpec expResult = null; studentspec.StudentSpec result = instance.removeStudentBySID(sidKey); assertEquals(expResult, result); }

@Test public void testToString() { System.out.println("toString"); StudentCollectionSpec instance = StudentCollection.createStudentCollection(); String expResult = ""; String result = instance.toString(); assertEquals(expResult, result); }

@Test

public void testCreateIterator() { System.out.println("createIterator"); studentcollection.StudentCollection instance = new studentcollection.StudentCollection(); java.util.Iterator expResult = null; java.util.Iterator result = instance.createIterator(); assertEquals(expResult, result); } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!