public void Backend_UTCConvensionsBackend_ToClientTime_Valid_Date_Already_Local_Should_Pass() { //arrange var inputDateTime = DateTime.Now; var expectDateTime = DateTime.Now; //act var result = UTCConversionsBackend.ToClientTime(inputDateTime); //assert Assert.AreEqual(expectDateTime.Minute, result.Minute, TestContext.TestName); Assert.AreEqual(expectDateTime.Hour, result.Hour, TestContext.TestName); }
public void Backend_UTCConvensionsBackend_ToClientTime_Valid_Date_UTC_timeOffSet_Is_Null_Should_Pass() { //arrange var inputDateTime = DateTime.Now; inputDateTime = DateTime.SpecifyKind(inputDateTime, DateTimeKind.Unspecified); var expectDateTime = DateTime.UtcNow; //act var result = UTCConversionsBackend.ToClientTime(inputDateTime); //assert Assert.AreEqual(expectDateTime.Minute, result.Minute, TestContext.TestName); Assert.AreEqual(expectDateTime.Hour, result.Hour, TestContext.TestName); }