public new virtual void SetUp()
 {
     base.SetUp();
     FormsAuthenticationService.GetLoggedInOrganisationId().Returns(OrganisationId);
     OrganisationsServiceAgent.Get(OrganisationId).Returns(_organisationFromServiceAgent);
     _result = OrganisationService.Get();
 }
            public new virtual void SetUp()
            {
                base.SetUp();
                const string organisationId = "orgId";

                FormsAuthenticationService.GetLoggedInOrganisationId().Returns(organisationId);
                _application = new Application {
                    Id = ApplicationId, OrganisationId = organisationId
                };
                ApplicationServiceAgent.GetByOrganisation(organisationId)
                .Returns(new List <Application> {
                    _application
                });
                _application.Name = NewNameThatAlreadyExists;
                ApplicationServiceAgent.Put(_application)
                .Returns(x => { throw new ApplicationNameAlreadyExistsException(); });
                try
                {
                    ApplicationService.Update(ApplicationId, NewNameThatAlreadyExists, Active);
                }
                catch (ApplicationNameAlreadyExistsException ex)
                {
                    _exception = ex;
                }
            }
 public new virtual void SetUp()
 {
     base.SetUp();
     FormsAuthenticationService.GetLoggedInOrganisationId().Returns(OrganisationId);
     ApplicationServiceAgent.GetByOrganisation(OrganisationId)
     .Returns(new List <Application> {
         new Application {
             Id = ApplicationId
         }
     });
     ApplicationService.GetById(ApplicationId);
 }
 public new virtual void SetUp()
 {
     base.SetUp();
     try
     {
         FormsAuthenticationService.GetLoggedInOrganisationId().Returns(OrganisationId);
         ApplicationServiceAgent.GetByOrganisation(OrganisationId).Returns(new List <Application>());
         ApplicationService.Update(ApplicationIdNotPartOfLoggedInOrganisation, NewName, true);
     }
     catch (ApplicationNotPartOfOrganisationException ex)
     {
         _exception = ex;
     }
 }
 public new virtual void SetUp()
 {
     base.SetUp();
     FormsAuthenticationService.GetLoggedInOrganisationId().Returns(InvalidOrganisationId);
     OrganisationsServiceAgent.Get(InvalidOrganisationId)
     .Returns(x => { throw new ItemNotFoundException(); });
     try
     {
         OrganisationService.Get();
     }
     catch (OrganisationIdNotValidException ex)
     {
         _exception = ex;
     }
 }
 public new virtual void SetUp()
 {
     base.SetUp();
     FormsAuthenticationService.GetLoggedInOrganisationId().Returns(OrganisationId);
     _applicationFromServiceAgentForGet = new Application {
         Id = ApplicationId
     };
     ApplicationServiceAgent.GetByOrganisation(OrganisationId)
     .Returns(new List <Application> {
         _applicationFromServiceAgentForGet
     });
     ApplicationServiceAgent.Get(ApplicationId).Returns(_applicationFromServiceAgentForGet);
     _applicationFromServiceAgentForGet.Name = NewName;
     ApplicationServiceAgent.Put(_applicationFromServiceAgentForGet)
     .Returns(_applicationFromServiceAgentForGet);
     _result = ApplicationService.Update(ApplicationId, NewName, Active);
 }
 public new virtual void SetUp()
 {
     base.SetUp();
     try
     {
         FormsAuthenticationService.GetLoggedInOrganisationId().Returns(OrganisationId);
         ApplicationServiceAgent.GetByOrganisation(OrganisationId).Returns(new List <Application> {
             new Application {
                 Id = ApplicationIdNotPartOfOrganisation + "xxx"
             }
         });
         ApplicationService.GetById(ApplicationIdNotPartOfOrganisation);
     }
     catch (ApplicationNotPartOfOrganisationException ex)
     {
         _exception = ex;
     }
 }