Skip to content
Snippets Groups Projects
Commit f2ae781f authored by bajuglair's avatar bajuglair
Browse files

Simplify tests.

parent 4844c0b8
Branches main
No related tags found
No related merge requests found
......@@ -35,7 +35,7 @@ public class ContainerTest {
assertTrue(basicRestaurant.getFridge() instanceof Fridge);
BasicRestaurant basicRestaurant2 = (BasicRestaurant) container.newInstance(BasicRestaurant.class, 0, false);
assertTrue(basicRestaurant2 == basicRestaurant);
assertSame(basicRestaurant2, basicRestaurant);
}
......@@ -49,7 +49,7 @@ public class ContainerTest {
BasicRestaurant basicRestaurant = (BasicRestaurant) container.newInstance(BasicRestaurant.class, 0, false);
Bakery bakery = (Bakery) container.newInstance(Bakery.class, 0, false);
assertTrue(bakery.getFridge() != basicRestaurant.getFridge());
assertNotSame(bakery.getFridge(), basicRestaurant.getFridge());
}
......@@ -71,7 +71,7 @@ public class ContainerTest {
container.register(Engine.class, Engine.class);
Bakery bakery = (Bakery) container.newInstance(Bakery.class, 0, false);
assertTrue(((Fridge) bakery.getFridge()).getEngine() instanceof Engine);
assertNotNull(((Fridge) bakery.getFridge()).getEngine());
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment