public new virtual void SetUp() { base.SetUp(); try { CollectionService.Stub(x => x.GetById(CollectionId)).Throw(new ItemNotFoundException()); ContentAreaService.GetByCollection(CollectionId); } catch (CollectionIdNotValidException ex) { _exception = ex; } }
public new virtual void SetUp() { base.SetUp(); ContentAreaRepository.Stub(x => x.ContentAreasInCollection(CollectionId)) .Return(new List<ContentArea>()); CollectionService.Stub(x => x.GetById(CollectionId)) .Throw(new ItemNotFoundException()); try { ContentAreaService.Create(contentArea); } catch (CollectionIdNotValidException ex) { exception = ex; } }