public void Ctor_Default() { var control = new QuotaControl(); Assert.True(control.IsCritical); Assert.Null(control.QuerySid); Assert.True(control.ServerSide); Assert.Equal("1.2.840.113556.1.4.1852", control.Type); Assert.Equal(new byte[] { 48, 132, 0, 0, 0, 2, 4, 0 }, control.GetValue()); }
public void Ctor_Default() { var control = new QuotaControl(); Assert.True(control.IsCritical); Assert.Null(control.QuerySid); Assert.True(control.ServerSide); Assert.Equal("1.2.840.113556.1.4.1852", control.Type); var expected = (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) ? new byte[] { 48, 132, 0, 0, 0, 2, 4, 0 } : new byte[] { 48, 2, 4, 0 }; Assert.Equal(expected, control.GetValue()); }
public void Ctor_QuerySid_Test(SecurityIdentifier querySid, byte[] expectedValue) { var control = new QuotaControl(querySid); Assert.True(control.IsCritical); if (querySid != null) { Assert.NotSame(querySid, control.QuerySid); } Assert.Equal(querySid, control.QuerySid); Assert.True(control.ServerSide); Assert.Equal("1.2.840.113556.1.4.1852", control.Type); Assert.Equal(expectedValue, control.GetValue()); }