public void OrganizersController_Ctor_throws_exception_if_repository_is_null()
 {
     sut = new OrganizersController(null);
 }
        public void StartUp()
        {
            _repositoryMock = new Mock<IGenericRepository>();

            organizers = new[]
            {
                new Organizer
                {
                    User = new Attendee()
                },
                new Organizer
                {
                    User = new Attendee()
                }
            };

            _repositoryMock.Setup(e => e.GetAll<Organizer>())
                .Returns(organizers);

            sut = new OrganizersController(_repositoryMock.Object);

            _repositoryMock.Setup(e => e.GetById<Organizer>(1, null)).Returns((Organizer) null);
            _repositoryMock.Setup(e => e.GetById<Organizer>(2, null)).Returns(new Organizer());
        }
 public void Cleanup()
 {
     _repositoryMock = null;
     _repositoryMock = null;
     sut = null;
 }