public void ParseDate() { //PrivateObject po = new PrivateObject(typeof(ExtractDateFromMailMessageActivity)); //DateTime result = (DateTime)po.Invoke("ParseDate", "15 Mar 2019 09:36:49 -0400"); DateTime result = ExtractDateFromMailMessageActivity.ParseDate("15 Mar 2019 09:36:49 -0400"); Assert.AreEqual(new DateTime(2019, 3, 15, 9, 36, 49), result); }
public void ParseDate() { //PrivateObject po = new PrivateObject(typeof(ExtractDateFromMailMessageActivityTest)); //DateTime result = (DateTime)po.Invoke("ParseDate", "11 Mar 2019 10:04:59 -0400"); DateTime result = ExtractDateFromMailMessageActivity.ParseDate("11 Mar 2019 10:04:59 -0400"); Assert.AreEqual(new DateTime(2019, 3, 11, 10, 4, 59), result); }