public void GetSessionHasToReturnSessionIfItExists() { var session = new Session(Guid.NewGuid().ToString()); A.CallTo(() => _readSessionRepository.GetSession(A <string> ._)).Returns(session); var result = _command.Get(Guid.NewGuid().ToString()); Assert.True(session.SessionId == result.SessionId); Assert.True(session.PlayerId == result.PlayerId); }
public GetSessionResult Get(string sessionId) { if (string.IsNullOrWhiteSpace(sessionId)) { return(new GetSessionResult(Session.Empty)); } var session = _readSessionRepository.GetSession(sessionId); return(new GetSessionResult(session)); }