public void Flag_Set_GetReturnsExpected() { var control = new VerifyNameControl { Flag = 10 }; Assert.Equal(10, control.Flag); }
public void ServerName_SetValid_GetReturnsExpected() { var control = new VerifyNameControl { ServerName = "ServerName" }; Assert.Equal("ServerName", control.ServerName); }
public void Ctor_ServerName_Flag(string serverName, int flag, byte[] expectedValue) { var control = new VerifyNameControl(serverName, flag); Assert.True(control.IsCritical); Assert.Equal(flag, control.Flag); Assert.Equal(serverName, control.ServerName); Assert.True(control.ServerSide); Assert.Equal("1.2.840.113556.1.4.1338", control.Type); Assert.Equal(expectedValue, control.GetValue()); }
public void Ctor_Default() { var control = new VerifyNameControl(); Assert.True(control.IsCritical); Assert.Equal(0, control.Flag); Assert.Null(control.ServerName); Assert.True(control.ServerSide); Assert.Equal("1.2.840.113556.1.4.1338", control.Type); Assert.Equal(new byte[] { 48, 132, 0, 0, 0, 5, 2, 1, 0, 4, 0 }, control.GetValue()); }
public void Ctor_Default() { var control = new VerifyNameControl(); Assert.True(control.IsCritical); Assert.Equal(0, control.Flag); Assert.Null(control.ServerName); Assert.True(control.ServerSide); Assert.Equal("1.2.840.113556.1.4.1338", control.Type); var expected = (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) ? new byte[] { 48, 132, 0, 0, 0, 5, 2, 1, 0, 4, 0 } : new byte[] { 48, 5, 2, 1, 0, 4, 0 }; Assert.Equal(expected, control.GetValue()); }
public void ServerName_SetNull_ThrowsArgumentNullException() { var control = new VerifyNameControl(); AssertExtensions.Throws <ArgumentNullException>("value", () => control.ServerName = null); }