From b053b9211b03bc334b6b0f9cc5ef22f7c500e6cc Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Fri, 1 Jul 2016 09:46:45 +0100 Subject: Implement RepeatedField.AddRange. This fixes issue #1730. --- .../src/Google.Protobuf.Test/Collections/RepeatedFieldTest.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'csharp/src/Google.Protobuf.Test/Collections/RepeatedFieldTest.cs') diff --git a/csharp/src/Google.Protobuf.Test/Collections/RepeatedFieldTest.cs b/csharp/src/Google.Protobuf.Test/Collections/RepeatedFieldTest.cs index 8ed54cfb..5d23d834 100644 --- a/csharp/src/Google.Protobuf.Test/Collections/RepeatedFieldTest.cs +++ b/csharp/src/Google.Protobuf.Test/Collections/RepeatedFieldTest.cs @@ -74,6 +74,16 @@ namespace Google.Protobuf.Collections Assert.AreEqual("bar", list[1]); } + [Test] + public void AddRange() + { + var list = new RepeatedField(); + list.AddRange(new[] { "foo", "bar" }); + Assert.AreEqual(2, list.Count); + Assert.AreEqual("foo", list[0]); + Assert.AreEqual("bar", list[1]); + } + [Test] public void Add_RepeatedField() { -- cgit v1.2.3