public void Lobby_ReturnsView() { // Arrange var mockUserSession = new Mock <IUserSession>(); mockUserSession.Setup(x => x.User).Returns(_savedUser); var sut = new LobbyController(FakeSwagCommunication, FakeSwagLobby, mockUserSession.Object); // Act var result = sut.Lobby(_lobbyViewModel) as ViewResult; // Assert Assert.IsInstanceOf <LobbyViewModel>(result.Model); }