//Assert
Lazy<INotificationService> notificationService = Substitute.For<Lazy<INotificationService>>();
Service target = new Service(repository, notificationService);
//Act
target.SendNotify("Message");
//Arrange
notificationService.Received().Value.sendNotification(null, null, null, null);
上記のコードは例外をスローします。
遅延初期化された型には、パラメーターのないパブリックコンストラクターがありません
C#4.0とNSubstitute1.2.1を使用しています