package nl.joshuaslik.tudelft.SEM.model.container;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;

import nl.joshuaslik.tudelft.SEM.model.container.Levels;
import org.junit.Test;

public class LevelsTest {

    @Test
    public void testAmountOfLevels() {
        assertEquals(Levels.amountOfLevels(), 4);
        assertNotEquals(Levels.amountOfLevels(), 7);
    }

    @Test
    public void testGetLevel() {
//        ArrayList<Bubble> bubbles = Levels.getLevelObjects(0);
//        assertEquals(bubbles.size(), 1);
//        bubbles = Levels.getLevelObjects(1);
//        assertEquals(bubbles.size(), 2);
//        bubbles = Levels.getLevelObjects(2);
//        assertEquals(bubbles.size(), 3);
//        assertEquals(bubbles.get(1).getRadius(), 20d, 0);
//        bubbles = Levels.getLevelObjects(3);
//        assertEquals(bubbles.size(), 3);
//        assertEquals(bubbles.get(1).getRadius(), 70d, 0);
//        bubbles = Levels.getLevelObjects(4);
//        assertEquals(bubbles.size(), 4);
    }

}

package nl.joshuaslik.tudelft.SEM.model.container;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;

import org.junit.Before;

import nl.joshuaslik.tudelft.SEM.control.gameObjects.IGameObjects;
import nl.joshuaslik.tudelft.SEM.control.viewController.viewObjects.ICircleViewObject;
import nl.joshuaslik.tudelft.SEM.model.container.Levels;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import static org.mockito.Mockito.when;

import javafx.scene.shape.Circle;

@RunWith(MockitoJUnitRunner.class)
public class LevelsTest {

	@Mock
	IGameObjects gameObjects;
    
	@Mock
	ICircleViewObject circle,circle2;
	
    @Test
    public void testAmountOfLevels() {
        assertEquals(Levels.amountOfLevels(), 4);
        assertNotEquals(Levels.amountOfLevels(), 7);
    }

    @Test
    public void testGetLevel0() {
    	when(gameObjects.makeCircle(200, 500, 20)).thenReturn(circle);
    	assertEquals(Levels.getLevelObjects(0, gameObjects).size(),1);
    }
    
    @Test
    public void testGetLevel1() {
    }

    @Test
    public void testNextLevel() {
    	Levels.setCurrentLevel(0);
    	Levels.nextLevel();
    	assertEquals(Levels.getCurrentLevel(),1);
    }
    
    @Test
    public void testLastLevel() {
    	Levels.setCurrentLevel(4);
    	Levels.nextLevel();
    	assertEquals(Levels.getCurrentLevel(),1);
    }
    
    @Test
    public void testUnlockedLevel() {
    	assertEquals(Levels.getUnlockedLevel(),1);
    	Levels.nextLevel();
    	assertEquals(Levels.getUnlockedLevel(),2);
    }
}

edit levelTest add comments <testing, documentation