public void InitializeEditMode() { Serie = null; SeriePropertyPresenter seriePropertyPresenter = new SeriePropertyPresenter(this); seriePropertyPresenter.SetToEditMode(); seriePropertyPresenter.SetFieldsEmpty(); }
protected override void Context() { m_SerieRepository = ObjectFactory.GetInstance<ISerieRepository>(); m_Serie = new Serie { Id = 1, Name = "Name", Description = "Test", PublicationYear = new DateTime(2000,1,1), Category = new Category { Id = 1, Name = "TestCategory", Description = "TestDesc" } }; }
protected override void Because() { using (IUnitOfWork uow = UnitOfWork.Start()) { using (IGenericTransaction transaction = uow.BeginTransaction()) { m_Id = m_SerieRepository.Add(m_Serie); m_NewSerie = m_SerieRepository.GetById(m_Id); transaction.Rollback(); } } }
public virtual bool Equals(Serie other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return Equals(other.Category, Category); }
protected override void Because() { using (UnitOfWork.Start()) { m_ReturnValue = m_SerieRepository.GetById(SerieId); } }