JUnit AssertionError when testing SimpledateFormat
问题 Using JUnit 4.12 and AndroidStudio I am trying to test below method Where results seems to be matching I don't know why as a reesult I am getting java.lang.AssertionError Method under test: public String dateNow() { SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy_hh-mm-ss"); String date = sdf.format(new Date()); return date; } My test class : private Addons mAddons; @Before public void setUp() throws Exception{ mAddons = new Addons(); } @Test public void testDateNow() throws Exception