So here are some of the methods that i want to test:
public class LQueueTest {
LQueue q;
public void setup()
{
q = new LQueue();
}
@Test
public void testIsEmpty() {
assertTrue(q.isEmpty());
}
@Test
public void testIsEmptyFalse() {
q.enqueue(5);
assertTrue(!q.isEmpty());
}
@Test
public void testSize() {
// not sure how }
@Test
public void testEnqueue() {
q.enqueue(5);
}
@Test(expected = QueueException.class)
public void testEmptyDequeue() {
q.dequeue();
}
@Test
public void testDequeue() {
q.dequeue();
}
public void testOneDequeue() {
q.enqueue(5);
q.dequeue();
assertTrue(q.isEmpty());
} }
so i have try to implement a simple method to test and it never work , why is the code incorrect?
Aucun commentaire:
Enregistrer un commentaire