public void Write_ToGranularity() { TimeSpanLabel testLabel = new TimeSpanLabel(); testLabel.Granularity = TimeSpanUnit.Weeks; Assert.AreEqual <TimeSpanUnit>(TimeSpanUnit.Weeks, testLabel.Granularity); }
public void Write_ToIsAge() { TimeSpanLabel testLabel = new TimeSpanLabel(); testLabel.IsAge = true; Assert.AreEqual<bool>(true, testLabel.IsAge); }
public void Write_ToIsAge() { TimeSpanLabel testLabel = new TimeSpanLabel(); testLabel.IsAge = true; Assert.AreEqual <bool>(true, testLabel.IsAge); }
public void Write_ToThreshold() { TimeSpanLabel testLabel = new TimeSpanLabel(); testLabel.Threshold = TimeSpanUnit.Days; Assert.AreEqual <TimeSpanUnit>(TimeSpanUnit.Days, testLabel.Threshold); }
public void UnitLengthProperty() { TimeSpanLabel testLabel = new TimeSpanLabel(); Assert.AreEqual <TimeSpanUnitLength>(testLabel.UnitLength, TimeSpanUnitLength.Short, "Expected default value of UnitLength property to be short"); testLabel.UnitLength = TimeSpanUnitLength.Long; Assert.AreEqual <TimeSpanUnitLength>(testLabel.UnitLength, TimeSpanUnitLength.Long, "UnitLength property could not be set"); }
public void UnitLengthTest() { TimeSpanUnitLength testValue = TimeSpanUnitLength.Long; TimeSpanLabel label = new TimeSpanLabel(); Assert.AreEqual<TimeSpanUnitLength>(TimeSpanUnitLength.Short, label.UnitLength, "Expected UnitLength to initially be Short"); label.UnitLength = testValue; Assert.AreEqual<TimeSpanUnitLength>(testValue, label.UnitLength, "UnitLength property not set as expected"); }
public void Write_ToTo() { DateTime baseDateTime = new DateTime(2066, 12, 12); TimeSpanLabel testLabel = new TimeSpanLabel(); testLabel.To = baseDateTime; Assert.AreEqual<DateTime>(baseDateTime, testLabel.To); }
public void Write_ToFrom() { DateTime baseDateTime = new DateTime(2008, 12, 12); TimeSpanLabel testLabel = new TimeSpanLabel(); testLabel.From = baseDateTime; Assert.AreEqual<DateTime>(baseDateTime, testLabel.From); }
public void Write_ToTo() { DateTime baseDateTime = new DateTime(2066, 12, 12); TimeSpanLabel testLabel = new TimeSpanLabel(); testLabel.To = baseDateTime; Assert.AreEqual <DateTime>(baseDateTime, testLabel.To); }
public void Write_ToFrom() { DateTime baseDateTime = new DateTime(2008, 12, 12); TimeSpanLabel testLabel = new TimeSpanLabel(); testLabel.From = baseDateTime; Assert.AreEqual <DateTime>(baseDateTime, testLabel.From); }
public void UnitLengthTest() { TimeSpanUnitLength testValue = TimeSpanUnitLength.Long; TimeSpanLabel label = new TimeSpanLabel(); Assert.AreEqual <TimeSpanUnitLength>(TimeSpanUnitLength.Short, label.UnitLength, "Expected UnitLength to initially be Short"); label.UnitLength = testValue; Assert.AreEqual <TimeSpanUnitLength>(testValue, label.UnitLength, "UnitLength property not set as expected"); }
public void Write_ToGranularity() { TimeSpanLabel testLabel = new TimeSpanLabel(); testLabel.Granularity = TimeSpanUnit.Weeks; Assert.AreEqual<TimeSpanUnit>(TimeSpanUnit.Weeks, testLabel.Granularity); }
public void UnitLengthProperty() { TimeSpanLabel testLabel = new TimeSpanLabel(); Assert.AreEqual<TimeSpanUnitLength>(testLabel.UnitLength, TimeSpanUnitLength.Short, "Expected default value of UnitLength property to be short"); testLabel.UnitLength = TimeSpanUnitLength.Long; Assert.AreEqual<TimeSpanUnitLength>(testLabel.UnitLength, TimeSpanUnitLength.Long, "UnitLength property could not be set"); }
public void Write_ToThreshold() { TimeSpanLabel testLabel = new TimeSpanLabel(); testLabel.Threshold = TimeSpanUnit.Days; Assert.AreEqual<TimeSpanUnit>(TimeSpanUnit.Days, testLabel.Threshold); }