Exemplo n.º 1
0
        public async Task GetTraceLogs_FilterByMessage_Return1TraceLog()
        {
            var sut       = new TraceLogService(_traceLogRepository);
            var traceLogs = await sut.GetTraceLogs(new TraceLogPagedDataRequest { Message = "{}" });

            Assert.AreEqual(1, traceLogs.Count);
            Assert.IsTrue(traceLogs.Contains(_traceLog2));
        }
Exemplo n.º 2
0
        public async Task GetTraceLogs_FilterByPerformedBy_Return1TraceLog()
        {
            var sut       = new TraceLogService(_traceLogRepository);
            var traceLogs = await sut.GetTraceLogs(new TraceLogPagedDataRequest { PerformedBy = "janetdoe" });

            Assert.AreEqual(1, traceLogs.Count);
            Assert.IsTrue(traceLogs.Contains(_traceLog3));
        }
Exemplo n.º 3
0
        public async Task GetTraceLogs_FilterByAction_Return2TraceLog()
        {
            var sut       = new TraceLogService(_traceLogRepository);
            var traceLogs = await sut.GetTraceLogs(new TraceLogPagedDataRequest { Action = "List" });

            Assert.AreEqual(2, traceLogs.Count);
            Assert.IsTrue(traceLogs.Contains(_traceLog1));
            Assert.IsTrue(traceLogs.Contains(_traceLog3));
        }
Exemplo n.º 4
0
        public async Task GetTraceLogs_RetrieveAllTraceLogs()
        {
            var sut       = new TraceLogService(_traceLogRepository);
            var traceLogs = await sut.GetTraceLogs(new TraceLogPagedDataRequest());

            Assert.AreEqual(3, traceLogs.Count);
            Assert.IsTrue(traceLogs.Contains(_traceLog1));
            Assert.IsTrue(traceLogs.Contains(_traceLog2));
            Assert.IsTrue(traceLogs.Contains(_traceLog3));
        }