public int getColorTest01([PexAssumeUnderTest] BusinessPlayer target, string input) { int result = target.getColor(input); return(result); // TODO: add assertions to method BusinessPlayerTest.getColorTest01(BusinessPlayer, String) }
public List <string> getColorTest([PexAssumeUnderTest] BusinessPlayer target) { List <string> result = target.getColor(); return(result); // TODO: add assertions to method BusinessPlayerTest.getColorTest(BusinessPlayer) }
private void simpleButton1_Click(object sender, EventArgs e) { String input = colorsBox.Text; BusinessPlayer business = new BusinessPlayer(Login.UserName, Login.Password); if (input.Equals("")) { MessageBox.Show("Vui lòng nhập màu sắc!"); return; } if (business.getColor(input) > 0) { MessageBox.Show("Màu đã tồn tại. Vui lòng nhập màu khác!"); return; } if (business.addColor(input) > 0) { MessageBox.Show("Thêm thành công!"); this.DialogResult = DialogResult.OK; this.color = input; this.Close(); } else { MessageBox.Show("Thêm thất bại!"); } }
private void getColor() { List <String> colors = business.getColor(); foreach (String color in colors) { colorsBox.Items.Add(color); } }
private void getColor() { BusinessPlayer business = new BusinessPlayer(Login.UserName, Login.Password); List <String> colors = business.getColor(); foreach (String color in colors) { colorsBox.Items.Add(color); } }