public void ConvertingBackInvalidTypeReturnsUnsetValue() { // Arrange var conv = new UtcToLocal(); // Act var v = conv.ConvertBack(string.Empty, null, null, null); // Assert Assert.AreEqual(DependencyProperty.UnsetValue, v); }
public void ConvertBackReturnsUtcTime() { // Arrange var conv = new UtcToLocal(); var now = DateTime.Now; // Act var nowUtc = (DateTime)conv.ConvertBack(now, null, null, null); // Assert Assert.AreNotEqual(DateTimeKind.Utc, now.Kind); Assert.AreEqual(DateTimeKind.Utc, nowUtc.Kind); }