public void CustomAce_CreateBinaryForm_Invalid() { GenericAce ace = new CustomAce((AceType)19, (AceFlags)0, new byte[4]); Assert.Throws <ArgumentNullException>("binaryForm", () => CustomAce.CreateFromBinaryForm(null, 1)); Assert.Throws <ArgumentOutOfRangeException>("offset", () => CustomAce.CreateFromBinaryForm(new byte[1], -1)); Assert.Throws <ArgumentException>("binaryForm", () => CustomAce.CreateFromBinaryForm(new byte[ace.BinaryLength + 1], 2)); Assert.Throws <ArgumentException>("binaryForm", () => CustomAce.CreateFromBinaryForm(new byte[ace.BinaryLength], 1)); }
public void CustomAce_CreateFromBinaryForm(GenericAce expectedAce, byte[] testBinaryForm, int testOffset) { GenericAce resultAce = CustomAce.CreateFromBinaryForm(testBinaryForm, testOffset); GenericAce_VerifyAces(expectedAce, resultAce); }