Exemplo n.º 1
0
 public void EverySecond()
 {
     var expected = new DateTime(2015, 1, 1, 5, 24, 12);
     var from = new DateTime(2015, 1, 1, 5, 24, 11);
     var sut = new Second();
     Assert.AreEqual(expected, sut.Evaluate(from));
 }
Exemplo n.º 2
0
 internal override OperatorBuilder InternalBuild()
 {
     var second = new Second();
     return new OperatorBuilder(constraints =>
     {
         second.AddConstraints(constraints);
         return second;
     });
 }
Exemplo n.º 3
0
        public void EverySecondExactlyOutsideBetweenButInclusive()
        {
            var expected = new DateTime(2015, 1, 1, 13, 0, 0);
            var from = new DateTime(2015, 1, 1, 13, 0, 0);

            var sut = new Second();
            sut.AddConstraint(new Between(new Timestamp(12), new Timestamp(13)));
            Assert.AreEqual(expected, sut.Evaluate(from, true));
        }
        public override void ExitEverysecond(GoldenFoxLanguageParser.EverysecondContext context)
        {
            var second = new Second();
            while (Current.Constraints.Any())
            {
                second.AddConstraint(Current.Constraints.Pop());
            }

            _stack.Push(second);
        }