Exemplo n.º 1
0
        public void DeleteConflictsFromThisLogThatNoConflicts()
        {
            ILog log           = new InMemoryLog();
            var  newLogEntries = new LogEntry[] {
                new LogEntry("System.String", null, 123L),
                new LogEntry("System.String", null, 123L),
                new LogEntry("System.String", null, 124L),
                new LogEntry("System.String", null, 124L),
                new LogEntry("System.String", null, 124L)
            };

            log.BatchAppendAsync(newLogEntries).Wait();

            var newLogEntries2 = new LogEntry[] {
                new LogEntry("System.String", null, 124L),
                new LogEntry("System.String", null, 124L)
            };

            log.DeleteConflictsFromThisLogAsync(2, newLogEntries2).Wait();
            Assert.Equal(newLogEntries.Length, log.CountAsync().Result);
        }