Using Classes in Unit Tests
AustinMcGowan (0)

I am trying to set up some Unit tests. I have a class called Cat and what I want me unit test to create some Cat objects. however I can't see to get this to work. The Cat class is in a file called Cat but the Unit test is giving an error saying it can't find symbol Cat.

You are viewing a single comment. View All
AustinMcGowan (0)

I am creating the Cat objects and calling their constructors in the advanced section:

// Initialization code(click to edit)
Cat lion ;
Cat tiger ;
Cat felix ;
Cat fluffy ;
@Before
public void setUp() {
// Setup code(click to edit)
lion = new Cat("Pantherinae", "Panthera", "Lion");
tiger = new Cat("Pantherinae", "Panthera", "Tiger");
felix = new Cat("Felinae", "Felis", "Domestic Cat");
fluffy = new Cat("Felinae", "Felis", "Domestic Cat");
}
@After
public void tearDown() {
// TearDown code(click to edit)
}