Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added tests and functionality #101

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open

Conversation

herrone
Copy link
Contributor

@herrone herrone commented Oct 30, 2023

Added tests for Jira #69

Comment on lines +63 to +90
txe_teamMemberFirstName.Text = "";
txe_teamMemberLastName.Text = "";
txe_teamMemberEmail.Text = "";
}


/*!
* Detect delete button being clicked
* @param sender (Object) the sender object created by the event
* @param e (EventArgs) the arguments passed into the event
*/
private async void DeleteButton_Clicked(object sender, EventArgs e)
{
if (ltv_teamMembers.SelectedItem == null)
{
await DisplayAlert("No TeamMember Selected", "Select the teamMember you want to delete from the list", "OK");
return;
}

TeamMember selectedTeamMember = (TeamMember)ltv_teamMembers.SelectedItem;

await teamMemberService.DeleteTeamMember(selectedTeamMember);
teamMembers.Remove(selectedTeamMember);

// Clear input fields
txe_teamMemberFirstName.Text = "";
txe_teamMemberLastName.Text = "";
txe_teamMemberEmail.Text = "";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this violates dry

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and it also violates SRP because it should be in a different method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants