Package test.it.hotel.model

Source Code of test.it.hotel.model.TestObjectMethods

package test.it.hotel.model;

import it.hotel.model.hotel.Hotel;
import it.hotel.model.structure.Structure;
import junit.framework.TestCase;


public class TestObjectMethods extends TestCase {
 
 
 
 
  public void testGetClass() {
   
   
    Hotel hotel = new Hotel();
   
    Class clazz = hotel.getClass();
   
    String className = clazz.getName();
   
    String[] stringNames = className.split("\\.");
   
    assertEquals(clazz, Hotel.class);
   
    assertEquals(className, "it.hotel.model.hotel.Hotel");
   
    assertEquals(stringNames[4], "Hotel" );
   
    Structure structure = new Structure();
   
    Class clazz1 = structure.getClass();
   
        String className1 = clazz1.getName();
   
    String[] stringNames1 = className1.split("\\.");
   
        assertEquals(clazz1, Structure.class);
   
    assertEquals(className1, "it.hotel.model.structure.Structure");
   
    assertEquals(stringNames1[4], "Structure" );
     
  }

}
TOP

Related Classes of test.it.hotel.model.TestObjectMethods

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.