I am writing a Junit test case for StandardAlone java class. I am getting nullPointerException while initialize the Class object. here is my code. Any help much appreciated
Here is my class
@RunWith(MockitoJUnitRunner.class) public class ABCGeneratorApplicationTest extends TestCase {
@Autowired
MyFileReader myFileReader;
@Before
public void setUp() throws Exception {
}
@Test
public void instrumentRead()
{
String[] args = {"20180518","0002"};
Stream<Employee> empList= myFileReader.read(args);
Assert.assertNotNull(instrumentStream);
}
Aucun commentaire:
Enregistrer un commentaire