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