aboutsummaryrefslogtreecommitdiff
path: root/src/ProtocolBuffers.Test/TestUtil.cs
diff options
context:
space:
mode:
authorJon Skeet <skeet@pobox.com>2009-01-27 12:25:21 +0000
committerJon Skeet <skeet@pobox.com>2009-01-27 12:25:21 +0000
commit642a8140c88dfb61f5f4812fc179e4f42beb4978 (patch)
tree4d5bef960bd3af7d84c168e675076c0f69990e1a /src/ProtocolBuffers.Test/TestUtil.cs
parent25a2792283ec695d3c038559ea0682f1d83d9bd3 (diff)
downloadprotobuf-642a8140c88dfb61f5f4812fc179e4f42beb4978.tar.gz
protobuf-642a8140c88dfb61f5f4812fc179e4f42beb4978.tar.bz2
protobuf-642a8140c88dfb61f5f4812fc179e4f42beb4978.zip
Setters/adders now throw ArgumentNullException appropriately.
Diffstat (limited to 'src/ProtocolBuffers.Test/TestUtil.cs')
-rw-r--r--src/ProtocolBuffers.Test/TestUtil.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ProtocolBuffers.Test/TestUtil.cs b/src/ProtocolBuffers.Test/TestUtil.cs
index d91d8540..47262ff9 100644
--- a/src/ProtocolBuffers.Test/TestUtil.cs
+++ b/src/ProtocolBuffers.Test/TestUtil.cs
@@ -1383,5 +1383,14 @@ namespace Google.ProtocolBuffers {
}
return bytes;
}
+
+ internal static void AssertArgumentNullException(Action action) {
+ try {
+ action();
+ Assert.Fail("Exception was not thrown");
+ } catch (ArgumentNullException) {
+ // We expect this exception.
+ }
+ }
}
}