Exemplo n.º 1
0
        public void Specifying_time_spans()
        {
            // There are two ways of specifying TimeSpans, again which one you use
            // is your choice and which reads better in context.

            var at8_31am = The.Time(08, 31);
            var at9_46am = At.Time(09, 46);

            Assert.That(at8_31am, Is.EqualTo(new TimeSpan(0, 8, 31, 0)));
            Assert.That(at9_46am, Is.EqualTo(new TimeSpan(0, 9, 46, 0)));
        }
Exemplo n.º 2
0
        public void Dates_1()
        {
            The.Year(2006).On.May.The10th.At(09, 00);

            On.July.The21st.At(07, 00);

            var aug11 = August.The11th;

            July.The(1);

            November.The(10);

            The.Year(2008).On.January.The10th.At(05, 49, 38);

            var created = On.May.The14th;

            Today.At(09, 00);

            // (These generate TimeSpans)
            The.Time(08, 31);
            At.Time(09, 46);
        }
Exemplo n.º 3
0
        public void Can_use_The_time_with_seconds()
        {
            var time = The.Time(14, 15, 16);

            Assert.That(time, Is.EqualTo(new TimeSpan(0, 14, 15, 16)));
        }
Exemplo n.º 4
0
        public void Can_use_The_time()
        {
            var time = The.Time(09, 31);

            Assert.That(time, Is.EqualTo(new TimeSpan(0, 09, 31, 0)));
        }
Exemplo n.º 5
0
        public void Can_use_The_time_with_seconds()
        {
            var time = The.Time(14, 15, 16);

            time.ShouldBe(new TimeSpan(0, 14, 15, 16));
        }
Exemplo n.º 6
0
        public void Can_use_The_time()
        {
            var time = The.Time(09, 31);

            time.ShouldBe(new TimeSpan(0, 09, 31, 0));
        }