コード例 #1
0
        public void ToDashboardNoteTest()
        {
            var note = new TestValueNote
            {
                Error = new Error {
                    Value = "Fehler Bla bla", ErrorCode = "666"
                },
                Message = "eifach kaputt gange"
            };
            var target = new LaborDashboardHelper(new NLogLoggerFactory());
            var actual =
                target.ToDashboardNote(new List <TestValue>
            {
                new TestValue {
                    TestValueNote = new List <TestValueNote> {
                        note, note
                    }
                },
                new TestValue {
                    TestValueNote = new List <TestValueNote> {
                        note
                    }
                }
            });

            actual.Count.Should()
            .Be(3);
            actual.ToList()[0].Code.Should()
            .Be("666");
            actual.ToList()[0].ErrorMessage.Should()
            .Be(note.Error.Value);
            actual.ToList()[0].Message.Should()
            .Be(note.Message);
        }
コード例 #2
0
        public void ToDashboardNoteEmptyTest()
        {
            var target = new LaborDashboardHelper(new NLogLoggerFactory());
            var note   = target.ToDashboardNote(new List <TestValue>());

            note.Count.Should()
            .Be(0);
        }