Пример #1
0
        public void Write_ToGranularity()
        {
            TimeSpanLabel testLabel = new TimeSpanLabel();

            testLabel.Granularity = TimeSpanUnit.Weeks;

            Assert.AreEqual <TimeSpanUnit>(TimeSpanUnit.Weeks, testLabel.Granularity);
        }
Пример #2
0
        public void Write_ToIsAge()
        {
            TimeSpanLabel testLabel = new TimeSpanLabel();

            testLabel.IsAge = true;

            Assert.AreEqual<bool>(true, testLabel.IsAge);
        }
Пример #3
0
        public void Write_ToIsAge()
        {
            TimeSpanLabel testLabel = new TimeSpanLabel();

            testLabel.IsAge = true;

            Assert.AreEqual <bool>(true, testLabel.IsAge);
        }
Пример #4
0
        public void Write_ToThreshold()
        {
            TimeSpanLabel testLabel = new TimeSpanLabel();

            testLabel.Threshold = TimeSpanUnit.Days;

            Assert.AreEqual <TimeSpanUnit>(TimeSpanUnit.Days, testLabel.Threshold);
        }
Пример #5
0
        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");
        }
Пример #6
0
        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");
        }
Пример #7
0
        public void Write_ToTo()
        {
            DateTime baseDateTime = new DateTime(2066, 12, 12);

            TimeSpanLabel testLabel = new TimeSpanLabel();

            testLabel.To = baseDateTime;

            Assert.AreEqual<DateTime>(baseDateTime, testLabel.To);
        }
Пример #8
0
        public void Write_ToFrom()
        {
            DateTime baseDateTime = new DateTime(2008, 12, 12);

            TimeSpanLabel testLabel = new TimeSpanLabel();

            testLabel.From = baseDateTime;

            Assert.AreEqual<DateTime>(baseDateTime, testLabel.From);
        }
Пример #9
0
        public void Write_ToTo()
        {
            DateTime baseDateTime = new DateTime(2066, 12, 12);

            TimeSpanLabel testLabel = new TimeSpanLabel();

            testLabel.To = baseDateTime;

            Assert.AreEqual <DateTime>(baseDateTime, testLabel.To);
        }
Пример #10
0
        public void Write_ToFrom()
        {
            DateTime baseDateTime = new DateTime(2008, 12, 12);

            TimeSpanLabel testLabel = new TimeSpanLabel();

            testLabel.From = baseDateTime;

            Assert.AreEqual <DateTime>(baseDateTime, testLabel.From);
        }
Пример #11
0
        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");
        }
Пример #12
0
        public void Write_ToGranularity()
        {
            TimeSpanLabel testLabel = new TimeSpanLabel();

            testLabel.Granularity = TimeSpanUnit.Weeks;

            Assert.AreEqual<TimeSpanUnit>(TimeSpanUnit.Weeks, testLabel.Granularity);
        }
Пример #13
0
        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");
        }
Пример #14
0
        public void Write_ToThreshold()
        {
            TimeSpanLabel testLabel = new TimeSpanLabel();

            testLabel.Threshold = TimeSpanUnit.Days;

            Assert.AreEqual<TimeSpanUnit>(TimeSpanUnit.Days, testLabel.Threshold);
        }