Skip to content

Commit

Permalink
Make GenericParameterHelper's behavior same between running and debug…
Browse files Browse the repository at this point in the history
…ging. (#362)
  • Loading branch information
walterlv authored and jayaranigarg committed Feb 12, 2018
1 parent a56da8c commit 70b6fa2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/TestFramework/MSTest.Core/GenericParameterHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ namespace Microsoft.VisualStudio.TestTools.UnitTesting
public class GenericParameterHelper : IComparable, IEnumerable
{
#region Private Fields
private static readonly Random Randomizer = new Random();
private int data;
private IList ienumerableStore;

Expand All @@ -40,8 +41,7 @@ public class GenericParameterHelper : IComparable, IEnumerable
/// </remarks>
public GenericParameterHelper()
{
Random randomizer = new Random();
this.Data = randomizer.Next();
this.Data = Randomizer.Next();
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ public void TestInitialize()
this.sut = new TestFrameworkV2.GenericParameterHelper(10);
}

[TestFrameworkV1.TestMethod]
public void EqualsShouldReturnFalseIfEachObjectHasDefaultDataValue()
{
TestFrameworkV2.GenericParameterHelper firstObject = new TestFrameworkV2.GenericParameterHelper();
TestFrameworkV2.GenericParameterHelper secondObject = new TestFrameworkV2.GenericParameterHelper();

TestFrameworkV1.Assert.IsFalse(firstObject.Equals(secondObject));
}

[TestFrameworkV1.TestMethod]
public void EqualsShouldReturnTrueIfTwoObjectHasSameDataValue()
{
Expand Down

0 comments on commit 70b6fa2

Please sign in to comment.