public void GetMonthDiff() { Assert.AreEqual(0, DateTimeUtility.GetMonthDiff(new DateTime(2018, 1, 1), new DateTime(2018, 1, 1))); Assert.AreEqual(11, DateTimeUtility.GetMonthDiff(new DateTime(2018, 1, 1), new DateTime(2018, 12, 1))); Assert.AreEqual(12, DateTimeUtility.GetMonthDiff(new DateTime(2018, 1, 1), new DateTime(2019, 1, 1))); Assert.AreEqual(-1, DateTimeUtility.GetMonthDiff(new DateTime(2018, 1, 1), new DateTime(2017, 12, 31))); Assert.AreEqual(-12, DateTimeUtility.GetMonthDiff(new DateTime(2018, 1, 1), new DateTime(2017, 1, 1))); }