public void Test_Notify_CallsActOnNotificationMethodOfInjectedObject_WhenCalled()
        {
            // Arrange
            Mock <INotificationAction> mockAction = new Mock <INotificationAction>();
            DependencyInjectionExample example    = new DependencyInjectionExample(mockAction.Object);
            string message = "Hello";

            // Act
            example.Notify(message);

            // Assert
            mockAction.Verify(m => m.ActOnNotification(message));
        }
Example #2
0
 public void DependencyInjection()
 {
     DependencyInjectionExample.DependencyInjection();
 }