public void ShouldHandleNullAndReturnNull() { Assert.That(OidParser.ReadFromBytes(null), Is.Null); }
public void ShouldHandleIncorrectlyTerminatedData() { var oid = OidParser.ReadFromBytes(new byte[] { 6, 8, 42, 134, 72, 206, 61, 3, 1, 255 }); Assert.That(oid, Is.Null); }
public void ShouldHandleIncorrectLengthCheck() { var oid = OidParser.ReadFromBytes(new byte[] { 6, 9, 42, 134, 72, 206, 61, 3, 1, 7 }); Assert.That(oid, Is.Null); }
public void ShouldHandleValidValue() { var oid = OidParser.ReadFromBytes(new byte[] { 6, 8, 42, 134, 72, 206, 61, 3, 1, 7 }); Assert.That(oid.Value, Is.EqualTo("1.2.840.10045.3.1.7")); }
public void ShouldHandleLengthTooShortEvenWithCorrectPreamble() { Assert.That(OidParser.ReadFromBytes(new byte[] { 6 }), Is.Null); }
public void ShouldHandleEmptyArrayAndReturnNull() { Assert.That(OidParser.ReadFromBytes(new byte[0]), Is.Null); }