public void CalculateHoursIncorrect() { TimeController tc = new TimeController(); Time t = new Time { Id = 1, Project_Id = 1, Date = DateTime.Now, TimeStart = new DateTime(2017, 08, 26, 08, 00, 00), TimeEnd = new DateTime(2017, 08, 26, 10, 00, 00), IsInvoiced = false, Description = "Test description" }; var expected = 3; var actual = tc.CalculateProjectHours(t); Assert.AreNotEqual(expected, actual); }