diff --git a/crypto/test/src/util/test/SimpleTest.cs b/crypto/test/src/util/test/SimpleTest.cs
index 91c493ef7..81c38b54f 100644
--- a/crypto/test/src/util/test/SimpleTest.cs
+++ b/crypto/test/src/util/test/SimpleTest.cs
@@ -187,20 +187,12 @@ namespace Org.BouncyCastle.Utilities.Test
public static DateTime MakeUtcDateTime(int year, int month, int day, int hour, int minute, int second)
{
-#if PORTABLE
return new DateTime(year, month, day, hour, minute, second, DateTimeKind.Utc);
-#else
- return new DateTime(year, month, day, hour, minute, second);
-#endif
}
public static DateTime MakeUtcDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond)
{
-#if PORTABLE
return new DateTime(year, month, day, hour, minute, second, millisecond, DateTimeKind.Utc);
-#else
- return new DateTime(year, month, day, hour, minute, second, millisecond);
-#endif
}
}
}
diff --git a/crypto/test/src/util/test/UncloseableStream.cs b/crypto/test/src/util/test/UncloseableStream.cs
index 0a7a16e66..2ec13f249 100644
--- a/crypto/test/src/util/test/UncloseableStream.cs
+++ b/crypto/test/src/util/test/UncloseableStream.cs
@@ -6,34 +6,24 @@ using Org.BouncyCastle.Utilities.IO;
namespace Org.BouncyCastle.Utilities.Test
{
/// <summary>
- /// This is a testing utility class to check the property that a <c>Stream</c> is never
- /// closed in some particular context - typically when wrapped by another <c>Stream</c> that
- /// should not be forwarding its <c>Stream.Close()</c> calls. Not needed in production code.
+ /// This is a testing utility class to check the property that a <see cref="Stream"/> is never disposed in some
+ /// particular context,typically when wrapped by another <see cref="Stream"/> that should not be forwarding its
+ /// <see cref="IDisposable.Dispose"/> calls. Not needed in production code.
/// </summary>
public class UncloseableStream
: FilterStream
{
- public UncloseableStream(
- Stream s)
+ public UncloseableStream(Stream s)
: base(s)
{
}
-#if PORTABLE
protected override void Dispose(bool disposing)
{
if (disposing)
- {
- throw new Exception("UncloseableStream was disposed");
- }
+ throw new InvalidOperationException("UncloseableStream was disposed");
base.Dispose(disposing);
}
-#else
- public override void Close()
- {
- throw new Exception("Close() called on UncloseableStream");
- }
-#endif
}
}
|