public void ErrorProvider_GetIconAlignment_InvokeWithoutError_ReturnsMiddleRight() { var provider = new ErrorProvider(); var control = new Control(); Assert.Equal(ErrorIconAlignment.MiddleRight, provider.GetIconAlignment(control)); // Call again. Assert.Equal(ErrorIconAlignment.MiddleRight, provider.GetIconAlignment(control)); }
public void ErrorProvider_SetIconAlignment_Invoke_GetIconAlignmentReturnsExpected(ErrorIconAlignment value) { var provider = new ErrorProvider(); var control = new Control(); provider.SetIconAlignment(control, value); Assert.Equal(value, provider.GetIconAlignment(control)); // Call again. provider.SetIconAlignment(control, value); Assert.Equal(value, provider.GetIconAlignment(control)); }
public void GetandSetIconAlignmentTest() { TextBox myTextBox = new TextBox(); ErrorProvider myErrorProvider = new ErrorProvider(); myErrorProvider.SetIconAlignment(myTextBox, ErrorIconAlignment.MiddleRight); Assert.AreEqual(ErrorIconAlignment.MiddleRight, myErrorProvider.GetIconAlignment(myTextBox), "#getset2"); }
public void ErrorProvider_GetIconAlignment_NullControl_ThrowsArgumentNullException() { var provider = new ErrorProvider(); Assert.Throws <ArgumentNullException>("control", () => provider.GetIconAlignment(null)); }