public void ToImportGlobal() { const string hex = "0161016203" + TestValues.GlobalTypeHex; using (var reader = BinaryTools.HexToReader(hex)) { var import = SegmentsParser.ToImport(reader); Assert.That(import.Global, Is.EqualTo(TestValues.GlobalType)); } }
public void ToImportWrongKind() { const string hex = "0161016204"; using (var reader = BinaryTools.HexToReader(hex)) { // ReSharper disable once AccessToDisposedClosure Assert.That(() => SegmentsParser.ToImport(reader), Throws.TypeOf <NotImplementedException>()); } }