private void CreateEntry_Click(object sender, EventArgs e) { DonationsController dc = new DonationsController(); dc.RegisterDonation(textBox1.Text, textBox2.Text, textBox3.Text, textBox4.Text); Donation D = new Donation(); this.Hide(); D.Show(); }
public void ItAcceptsDonationsService() { // Arrange var donationsService = Substitute.For <IDonationService>(); // Act var controller = new DonationsController(donationsService); // Assert controller.Should().NotBeNull(); }
private void UpdateDonation_Load(object sender, EventArgs e) { Donations D = new Donations(); dc = new DonationsController(); D = dc.GetDonationsByID(ID); textBox5.Text = D.Sno.ToString(); textBox1.Text = D.Name; textBox2.Text = D.Amount; textBox3.Text = D.Branch; textBox4.Text = D.UsedFor; }
private void Donation_Load(object sender, EventArgs e) { dc = new DonationsController(); dataGridView1.DataSource = dc.GetDonation().Tables[0]; }
public GetTests() { _donationService = Substitute.For <IDonationService>(); _donationService.GetAll().Returns(new List <Donation>()); _sut = new DonationsController(_donationService); }