public void The_Reference_Should_Be_Updated() { IMainPanel mainPanel = MockRepository.GenerateStub <IMainPanel>(); IReferenceForm form = MockRepository.GenerateStub <IReferenceForm>(); Reference reference = TestHelper.GetReference(); //var presenter = new ReferencePresenter(mainPanel, form); //presenter.AttachToModel(reference); form.Entity1 = new EntityImpl("Entity1"); form.GetEventRaiser(f => f.Entity1Changed += null).Raise(form, new EventArgs()); Assert.That(reference.Entity1, Is.SameAs(form.Entity1)); }
public void The_Reference_Should_Be_Updated() { IMainPanel mainPanel = MockRepository.GenerateStub <IMainPanel>(); IReferenceForm form = MockRepository.GenerateStub <IReferenceForm>(); Reference reference = TestHelper.GetReference(); //var presenter = new ReferencePresenter(mainPanel, form); //presenter.AttachToModel(reference); form.End2Enabled = false; form.GetEventRaiser(f => f.End2EnabledChanged += null).Raise(form, new EventArgs()); Assert.That(reference.End2Enabled, Is.EqualTo(false)); }