public void Setup() { var connection = ServiceTestHelper.GetDatabaseConnection(); sessionDataService = new SessionDataService(connection); sessionTestHelper = new SessionTestHelper(connection); }
public void StartOrRestartDelegateSession_Should_Start_Subsequent_Session() { using (new TransactionScope()) { // When const int candidateId = 101; const int customisationId = 1240; var sessionId = sessionDataService.StartOrRestartDelegateSession(candidateId, customisationId); // Then var newSession = sessionTestHelper.GetSession(sessionId); newSession.Should().NotBeNull(); SessionTestHelper.SessionsShouldBeApproximatelyEquivalent( newSession !, SessionTestHelper.CreateDefaultSession(sessionId) ); } }