- README.md is added

- Change the name to factory is done
- Local variable type inference is used
This commit is contained in:
Samil Ayoub
2020-09-03 22:08:54 +01:00
parent 8afe4c314a
commit badf0c6b8c
10 changed files with 347 additions and 0 deletions
@@ -0,0 +1,14 @@
package com.iluwatar.factory;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
class AppTest {
@Test
void shouldExecuteWithoutExceptions() {
assertDoesNotThrow(() -> App.main(new String[]{}));
}
}
@@ -0,0 +1,15 @@
package com.iluwatar.factory;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
class CarsFactoryTest {
@Test
void shouldReturnFerrariInstance() {
final var ferrari = CarsFactory.getCar(CarsFactory.CarType.FERRARI);
assertTrue(ferrari instanceof Ferrari);
}
}