/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

import worldoffri.Miestnost;
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.*;

/**
 *
 * @author novacik1
 */
public class miestnostTest {
    private Miestnost miestnosti;
    public miestnostTest() {
    }

    @BeforeClass
    public static void setUpClass() throws Exception {
    }

    @AfterClass
    public static void tearDownClass() throws Exception {
    }
    
    @Before
    public void setUp() {
    }
    
    @Test
    public void testJuh() {
        Miestnost juzna = new Miestnost("terasa");
        assertEquals("terasa", juzna.dajPopis());
    }
    
    @Test
    public void testSever() {
        Miestnost severna = new Miestnost("labak");
        assertFalse("cokolvek".equals(severna.dajPopis()));
    }
    
    @Test
    public void testNemaVychody() {
        Miestnost severna = new Miestnost("severna");
        Miestnost vychodna = new Miestnost("vychodna");
        Miestnost zapadna = new Miestnost("zapadna");
        Miestnost juzna = new Miestnost("juzna");
        Miestnost nejaka = new Miestnost("nejaka");
        juzna.nastavVychody(null, null);
        assertNull(juzna.dajVychod(null));
        }
    
    @Test
    public void testNemaVychody2() {
        Miestnost severna = new Miestnost("severna");
        Miestnost juzna = new Miestnost("juzna");
        Miestnost zapadna = new Miestnost("zapadna");
        Miestnost vychodna = new Miestnost("vychodna");
        severna.nastavVychody("sever", juzna);
        assertSame(severna.dajVychod("sever"), (juzna));
    }
    
    @After
    public void tearDown() {
    }
    // TODO add test methods here.
    // The methods must be annotated with annotation @Test. For example:
    //
    // @Test
    // public void hello() {}
}
