コード例 #1
0
ファイル: TimeSpanLabelTest.cs プロジェクト: odnodn/mscui
        public void Write_ToGranularity()
        {
            TimeSpanLabel testLabel = new TimeSpanLabel();

            testLabel.Granularity = TimeSpanUnit.Weeks;

            Assert.AreEqual <TimeSpanUnit>(TimeSpanUnit.Weeks, testLabel.Granularity);
        }
コード例 #2
0
ファイル: TimeSpanLabelTest.cs プロジェクト: rbirkby/mscui
        public void Write_ToIsAge()
        {
            TimeSpanLabel testLabel = new TimeSpanLabel();

            testLabel.IsAge = true;

            Assert.AreEqual<bool>(true, testLabel.IsAge);
        }
コード例 #3
0
ファイル: TimeSpanLabelTest.cs プロジェクト: odnodn/mscui
        public void Write_ToIsAge()
        {
            TimeSpanLabel testLabel = new TimeSpanLabel();

            testLabel.IsAge = true;

            Assert.AreEqual <bool>(true, testLabel.IsAge);
        }
コード例 #4
0
ファイル: TimeSpanLabelTest.cs プロジェクト: odnodn/mscui
        public void Write_ToThreshold()
        {
            TimeSpanLabel testLabel = new TimeSpanLabel();

            testLabel.Threshold = TimeSpanUnit.Days;

            Assert.AreEqual <TimeSpanUnit>(TimeSpanUnit.Days, testLabel.Threshold);
        }
コード例 #5
0
ファイル: TimeSpanLabelTest.cs プロジェクト: odnodn/mscui
        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
ファイル: TimeSpanLabelTest.cs プロジェクト: rbirkby/mscui
        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
ファイル: TimeSpanLabelTest.cs プロジェクト: rbirkby/mscui
        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
ファイル: TimeSpanLabelTest.cs プロジェクト: rbirkby/mscui
        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
ファイル: TimeSpanLabelTest.cs プロジェクト: odnodn/mscui
        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
ファイル: TimeSpanLabelTest.cs プロジェクト: odnodn/mscui
        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
ファイル: TimeSpanLabelTest.cs プロジェクト: odnodn/mscui
        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
ファイル: TimeSpanLabelTest.cs プロジェクト: rbirkby/mscui
        public void Write_ToGranularity()
        {
            TimeSpanLabel testLabel = new TimeSpanLabel();

            testLabel.Granularity = TimeSpanUnit.Weeks;

            Assert.AreEqual<TimeSpanUnit>(TimeSpanUnit.Weeks, testLabel.Granularity);
        }
コード例 #13
0
ファイル: TimeSpanLabelTest.cs プロジェクト: rbirkby/mscui
        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
ファイル: TimeSpanLabelTest.cs プロジェクト: rbirkby/mscui
        public void Write_ToThreshold()
        {
            TimeSpanLabel testLabel = new TimeSpanLabel();

            testLabel.Threshold = TimeSpanUnit.Days;

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