示例#1
0
        public void ScheduleEntrySetter_Process_NoNote()
        {
            ScheduleEntry scheduleEntry = new ScheduleEntry()
            {
                EntryText = new List <string>()
                {
                    "1 28.01.2009      Transformer Chamber (Ground   23.01.2009      EGL551039",
                    "tinted blue     Floor)                        99 years from",
                    "(part of)                                     23.1.2009"
                }
            };

            DefaultNoteExtractor noteExtractor = new DefaultNoteExtractor();

            string note = noteExtractor.Extract(scheduleEntry.EntryText);

            note.Should().BeNull("because there is no note");
        }
示例#2
0
        public void DefaultNoteExtractor_Extract_SingleLineNote_HasNote()
        {
            ScheduleEntry scheduleEntry = new ScheduleEntry()
            {
                EntryText = new List <string>()
                {
                    "1 28.01.2009      Transformer Chamber (Ground   23.01.2009      EGL551039",
                    "tinted blue     Floor)                        99 years from",
                    "(part of)                                     23.1.2009",
                    "NOTE: This is a note"
                }
            };

            DefaultNoteExtractor noteExtractor = new DefaultNoteExtractor();

            string note = noteExtractor.Extract(scheduleEntry.EntryText);

            note.Should().Be("This is a note", "because the note spans 1 line only");
        }