Skip to content

Commit

Permalink
Merge pull request #148 from MindscapeHQ/Ignore-all-form-fields
Browse files Browse the repository at this point in the history
Ignore all form fields
  • Loading branch information
QuantumNightmare committed Jun 26, 2014
2 parents fc6d43d + 7e543d1 commit cf05132
Show file tree
Hide file tree
Showing 36 changed files with 1,278 additions and 337 deletions.
4 changes: 2 additions & 2 deletions AssemblyVersionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.2.1.0")]
[assembly: AssemblyFileVersion("2.2.1.0")]
[assembly: AssemblyVersion("3.0.0.0")]
[assembly: AssemblyFileVersion("3.0.0.0")]
2 changes: 1 addition & 1 deletion Mindscape.Raygun4Net.Signed.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata minClientVersion="2.5">
<id>Mindscape.Raygun4Net.Signed</id>
<version>2.2.1</version>
<version>3.0.0</version>
<title />
<authors>Mindscape</authors>
<owners />
Expand Down
55 changes: 55 additions & 0 deletions Mindscape.Raygun4Net.Tests/RaygunClientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,34 @@ public void DefaultUser()
Assert.IsNull(_client.User);
}

[Test]
public void DefaultUserInfo()
{
Assert.IsNull(_client.UserInfo);
}

[Test]
public void UserProperty()
{
_client.User = "Robbie Robot";
Assert.AreEqual("Robbie Robot", _client.User);
}

[Test]
public void UserInfoProperty()
{
RaygunIdentifierMessage user = new RaygunIdentifierMessage("Robbie Robot");
_client.UserInfo = user;
Assert.AreSame(user, _client.UserInfo);
}

[Test]
public void MessageWithNoUser()
{
RaygunMessage message = _client.ExposeBuildMessage(_exception);
Assert.IsNull(message.Details.User);
}

[Test]
public void MessageWithUser()
{
Expand All @@ -44,6 +65,40 @@ public void MessageWithUser()
Assert.AreEqual("Robbie Robot", message.Details.User.Identifier);
}

[Test]
public void MessageWithUserInfo()
{
RaygunIdentifierMessage user = new RaygunIdentifierMessage("Robbie Robot") { IsAnonymous = true };
_client.UserInfo = user;

RaygunMessage message = _client.ExposeBuildMessage(_exception);
Assert.AreEqual("Robbie Robot", message.Details.User.Identifier);
Assert.IsTrue(message.Details.User.IsAnonymous);
}

[Test]
public void UserInfoTrumpsUser()
{
RaygunIdentifierMessage user = new RaygunIdentifierMessage("Robbie Robot") { IsAnonymous = true };
_client.UserInfo = user;
_client.User = "Not Robbie Robot";

RaygunMessage message = _client.ExposeBuildMessage(_exception);
Assert.AreEqual("Robbie Robot", message.Details.User.Identifier);
Assert.IsTrue(message.Details.User.IsAnonymous);
}

[Test]
public void IsAnonymousDefault()
{
RaygunIdentifierMessage user = new RaygunIdentifierMessage("Robbie Robot");
Assert.IsFalse(user.IsAnonymous);

_client.User = "Robbie Robot";
RaygunMessage message = _client.ExposeBuildMessage(_exception);
Assert.IsFalse(message.Details.User.IsAnonymous);
}

// Application version tests

[Test]
Expand Down
Loading

0 comments on commit cf05132

Please sign in to comment.