AssertHelperTest.TestAlmostEqualWithDoubles() was testing the same code twice - fixed; made use of Assert.AreSame() instead of manually calling object.ReferenceEquals() in the SharedTest class; fixed documentation referring to the custom WeakReference as the System.WeakReference class

git-svn-id: file:///srv/devel/repo-conversion/nusu@112 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
Markus Ewald 2009-01-08 20:14:14 +00:00
parent 6eb49ed0d2
commit 8f6616f79a
3 changed files with 6 additions and 8 deletions

View File

@ -64,7 +64,7 @@ namespace Nuclex.Support {
[Test] [Test]
public void TestAlmostEqualWithDoubles() { public void TestAlmostEqualWithDoubles() {
AssertHelper.AreAlmostEqual(exactDouble, minusOneDouble, 1); AssertHelper.AreAlmostEqual(exactDouble, minusOneDouble, 1);
AssertHelper.AreAlmostEqual(exactDouble, minusOneDouble, 1); AssertHelper.AreAlmostEqual(exactDouble, plusOneDouble, 1);
} }
/// <summary> /// <summary>

View File

@ -58,9 +58,7 @@ namespace Nuclex.Support {
// //
// Maybe this really is a defect in Shared<> and the class should be equipped with // Maybe this really is a defect in Shared<> and the class should be equipped with
// a method such as Discard() or Dispose() to get rid of the instance? // a method such as Discard() or Dispose() to get rid of the instance?
Assert.IsTrue( Assert.AreSame(dummyInstance, otherDummyInstance);
ReferenceEquals(dummyInstance, otherDummyInstance)
);
} }
} }

View File

@ -33,7 +33,7 @@ namespace Nuclex.Support {
where ReferencedType : class { where ReferencedType : class {
/// <summary> /// <summary>
/// Initializes a new instance of the System.WeakReference class, referencing /// Initializes a new instance of the WeakReference class, referencing
/// the specified object. /// the specified object.
/// </summary> /// </summary>
/// <param name="target">The object to track or null.</param> /// <param name="target">The object to track or null.</param>
@ -41,7 +41,7 @@ namespace Nuclex.Support {
: base(target) { } : base(target) { }
/// <summary> /// <summary>
/// Initializes a new instance of the System.WeakReference class, referencing /// Initializes a new instance of the WeakReference class, referencing
/// the specified object optionally using resurrection tracking. /// the specified object optionally using resurrection tracking.
/// </summary> /// </summary>
/// <param name="target">An object to track.</param> /// <param name="target">An object to track.</param>
@ -53,7 +53,7 @@ namespace Nuclex.Support {
: base(target, trackResurrection) { } : base(target, trackResurrection) { }
/// <summary> /// <summary>
/// Initializes a new instance of the System.WeakReference class, using deserialized /// Initializes a new instance of the WeakReference class, using deserialized
/// data from the specified serialization and stream objects. /// data from the specified serialization and stream objects.
/// </summary> /// </summary>
/// <param name="info"> /// <param name="info">
@ -71,7 +71,7 @@ namespace Nuclex.Support {
: base(info, context) { } : base(info, context) { }
/// <summary> /// <summary>
/// Gets or sets the object (the target) referenced by the current System.WeakReference /// Gets or sets the object (the target) referenced by the current WeakReference
/// object. /// object.
/// </summary> /// </summary>
/// <remarks> /// <remarks>