public void ListAsync_WhenSpecificationIsNull_ThrowsArgumentNullException() { var contextRepo = new ContextRepository <IAuditedContext>(It.IsAny <IAuditedContext>(), It.IsAny <ILogger <IAuditedContext> >()); var exception = Assert.ThrowsAsync <ArgumentNullException>(() => contextRepo.ListAsync <object>(null)); Assert.AreEqual("Value cannot be null. (Parameter 'specification')", exception.Message); }