public void LiteralEncoder_TaggedVector() { var b = new BlobBuilder(); var e = new LiteralEncoder(b); Assert.Same(b, e.Builder); var parts = e.TaggedVector(); AssertEx.Equal(new byte[0], b.ToArray()); Assert.Same(b, parts.Item1.Builder); Assert.Same(b, parts.Item2.Builder); b.Clear(); e.TaggedVector( part => Assert.Same(b, part.Builder), part => Assert.Same(b, part.Builder)); Assert.Throws <ArgumentNullException>(() => e.TaggedVector(null, _ => { })); Assert.Throws <ArgumentNullException>(() => e.TaggedVector(_ => { }, null)); }
public void LiteralEncoder_TaggedVector() { var b = new BlobBuilder(); var e = new LiteralEncoder(b); Assert.Same(b, e.Builder); CustomAttributeArrayTypeEncoder arrayType; VectorEncoder vector; e.TaggedVector(out arrayType, out vector); AssertEx.Equal(new byte[0], b.ToArray()); Assert.Same(b, arrayType.Builder); Assert.Same(b, vector.Builder); b.Clear(); e.TaggedVector( at => Assert.Same(b, at.Builder), v => Assert.Same(b, v.Builder)); Assert.Throws <ArgumentNullException>(() => e.TaggedVector(null, v => { })); Assert.Throws <ArgumentNullException>(() => e.TaggedVector(at => { }, null)); }
public void LiteralEncoder_TaggedVector() { var b = new BlobBuilder(); var e = new LiteralEncoder(b); Assert.Same(b, e.Builder); CustomAttributeArrayTypeEncoder arrayType; VectorEncoder vector; e.TaggedVector(out arrayType, out vector); AssertEx.Equal(new byte[0], b.ToArray()); Assert.Same(b, arrayType.Builder); Assert.Same(b, vector.Builder); b.Clear(); e.TaggedVector( at => Assert.Same(b, at.Builder), v => Assert.Same(b, v.Builder)); Assert.Throws<ArgumentNullException>(() => e.TaggedVector(null, v => { })); Assert.Throws<ArgumentNullException>(() => e.TaggedVector(at => { }, null)); }
public void LiteralEncoder_TaggedVector() { var b = new BlobBuilder(); var e = new LiteralEncoder(b); Assert.Same(b, e.Builder); var parts = e.TaggedVector(); AssertEx.Equal(new byte[0], b.ToArray()); Assert.Same(b, parts.Item1.Builder); Assert.Same(b, parts.Item2.Builder); b.Clear(); e.TaggedVector( part => Assert.Same(b, part.Builder), part => Assert.Same(b, part.Builder)); Assert.Throws<ArgumentNullException>(() => e.TaggedVector(null, _ => { })); Assert.Throws<ArgumentNullException>(() => e.TaggedVector(_ => { }, null)); }