Exemplo n.º 1
0
        public PatientView()
        {
            InitializeComponent();
            patientViewPresenter = new PatientViewPresenter(this);

            //GetPatientButton.Click += (sender, e) => patientViewPresenter.OnGetPatientButtonClick();
            PatientIdTextbox.TextChanged += (sender, e) => patientViewPresenter.OnTextChanged();
        }
Exemplo n.º 2
0
        public PatientView()
        {
            InitializeComponent();
            patientViewPresenter = new PatientViewPresenter(this);

            //GetPatientButton.Click += (sender, e) => patientViewPresenter.OnGetPatientButtonClick();
            PatientIdTextbox.TextChanged += (sender, e) => patientViewPresenter.OnTextChanged();
        }
Exemplo n.º 3
0
        public void LoadPatient_returns_correct_patient()
        {
            // Arrange
            Mock <IPatientView>  mockView  = new Mock <IPatientView>();
            PatientViewPresenter presenter = new PatientViewPresenter(mockView.Object);

            mockView.Setup(p => p.PatientIdInput).Returns("1");

            // Act
            presenter.LoadPatient();

            // Assert
            Assert.AreEqual(mockView.Object.PatientName, "Will Smith");
        }
Exemplo n.º 4
0
        public void LoadPatient_returns_correct_patient()
        {
            // Arrange
            Mock<IPatientView> mockView = new Mock<IPatientView>();
            PatientViewPresenter presenter = new PatientViewPresenter(mockView.Object);

            mockView.Setup(p => p.PatientIdInput).Returns("1");

            // Act
            presenter.LoadPatient();

            // Assert
            Assert.AreEqual(mockView.Object.PatientName, "Will Smith");
        }