Ejemplo n.º 1
0
        public void Process_ShouldFix_Dates(string dateString, string expected)
        {
            var command = new DatabaseCommand
            {
                CommandText = dateString
            };

            _processor.Process(command, _database.Object);

            Assert.AreEqual(expected, command.CommandText);
        }
Ejemplo n.º 2
0
        public void TestProcessFlow()
        {
            ProcessPipe <DateTime, Object> pipeline = new DateTimeProcessor().Connect(new LowerCaseProcessor())
                                                      .Connect(new CasterPipe <String, Object>());

            Object output = pipeline.Process(new DateTime(2033, 8, 27, 18, 53, 22));

            Assert.AreEqual(output, "saturday, august 27, 2033 6:53:22 pm");
        }