public void SetupController()
        {
            resultsRows = Builder<NiceLittleForm>.CreateListOfSize(TotalRows).Build();

            repository = Substitute.For<IRepository<NiceLittleForm>>();
            session = Substitute.For<IRepositorySession>();
            repository.All().Returns(resultsRows.AsQueryable());

            RepositorySession.DefaultContainerType = typeof(FakeObjectContext);

            controller = new NiceLittleFormController(repository, session);
        }
 public DeleteSessionTest()
 {
     _mediator          = new Mock <IMediator>();
     _id                = Guid.NewGuid();
     _repositorySession = SessionRepositoryBuilder.Instance().Find(_id).Build();
     _command           = new DeleteSessionRequest(_id);
 }
 public AddSessionTest()
 {
     _faker             = new Faker();
     _mediator          = new Mock <IMediator>();
     _id                = Guid.NewGuid();
     _repositorySession = SessionRepositoryBuilder.Instance().NotExists().Build();
     _command           = new AddSessionRequest
     {
         SessionStart = _faker.Date.Recent(1),
         SessionEnd   = "01:30",
         TicketValue  = _faker.Finance.Amount(1, 200),
         Animation    = _faker.PickRandom <AnimationType>(),
         Audio        = _faker.PickRandom <AudioType>(),
         RoomId       = Guid.NewGuid(),
         MovieId      = Guid.NewGuid()
     }
     ;
 }
Exemple #4
0
 public UserRepository(IRepositorySession repositorySession)
 {
     _repositorySession = (RepositorySession)repositorySession;
 }
Exemple #5
0
		public ScheduleDataCopier(IRepositorySession source, (IRepositorySession destination)
Exemple #6
0
 public WebSiteRepository(IRepositorySession repositorySession)
 {
     _repositorySession = (RepositorySession)repositorySession;
 }
 public AddSessionHandle(IMediator mediator, IRepositorySession repositorySession)
 {
     _mediator          = mediator;
     _repositorySession = repositorySession;
 }
 public GetSessionsHandle(IMediator mediator, IRepositorySession repositorySession)
 {
     _mediator          = mediator;
     _repositorySession = repositorySession;
 }
Exemple #9
0
 public WebSiteService(IWebSiteRepository webSiteRepository, IRepositorySession session, IFileAccessService fileAccessService)
 {
     _webSiteRepository = webSiteRepository;
     _session           = session;
     _fileAccessService = fileAccessService;
 }
 public NiceLittleFormController(IRepository<NiceLittleForm> repository, IRepositorySession workingSession)
 {
     workingDatabaseSession = workingSession;
     this.repository = repository;
 }
 public NiceLittleFormController()
 {
     workingDatabaseSession = new RepositorySession(new NotBigDataEntities());
     repository = new NiceLittleFormRepository(workingDatabaseSession);
 }
 public SessionController(IRepositorySession repository)
 {
     _repositorySession = repository;
 }
Exemple #13
0
 public DeleteMovieHandle(IMediator mediator, IRepositoryMovie repositoryMovie, IRepositorySession repositorySession)
 {
     _mediator          = mediator;
     _repositoryMovie   = repositoryMovie;
     _repositorySession = repositorySession;
 }