Пример #1
0
            public void WhenAPostIsDeleted_ThenAnExceptionIsThrown()
            {
                var hub = new TestableAdminHub(null, null);
                Action act = () => hub.DeleteBlogPost(It.IsAny<Guid>());

                act.ShouldThrow<NotLoggedInException>();
            }
Пример #2
0
 public void WhenAPostIsSentToTheHub_ThenAnExceptionIsThrown()
 {
     var hub = new TestableAdminHub(null, null);
     Action act = () => hub.AddBlogPost(new NewPostViewModel());
     act.ShouldThrow<NotLoggedInException>();
 }