public void GivanNoUser_ThenTheHubThrowsaNotLoggedInException() { _hub = new TestableAuthenticatingHub(null); try { var foo = _hub.Identity; } catch (Exception e) { e.Should().BeOfType<NotLoggedInException>(); return; } Assert.Fail("Exception should be thrown"); }
public void GivanAValidUser_ThenTheHubReturnsTheCorrectIdentity() { _hub = new TestableAuthenticatingHub("Kevin"); _hub.Identity.Should().Be("Kevin"); }