Skip to content

Commit 5416e54

Browse files
committed
Fixed the unit tests
1 parent dfbf66e commit 5416e54

File tree

3 files changed

+11
-21
lines changed

3 files changed

+11
-21
lines changed

src/Exceptionless.Tests/Plugins/DeduplicationBenchmarks.cs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,25 +52,18 @@ public void RandomExceptions() {
5252
_duplicateCheckerPlugin.Run(context);
5353
}
5454

55-
56-
5755
[Benchmark]
58-
public void IdenticalExceptions()
59-
{
56+
public void IdenticalExceptions() {
6057
var context = new EventPluginContext(_client, _fixedEventBuilder.Target, _fixedEventBuilder.PluginContextData);
6158

6259
_errorPlugin.Run(context);
6360
_duplicateCheckerPlugin.Run(context);
6461
}
6562

66-
private Exception GetException(string message = "Test")
67-
{
68-
try
69-
{
63+
private Exception GetException(string message = "Test") {
64+
try {
7065
throw new Exception(message);
71-
}
72-
catch (Exception ex)
73-
{
66+
} catch (Exception ex) {
7467
return ex;
7568
}
7669
}

src/Exceptionless.Tests/Utility/ErrorDataReader.cs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,22 @@
99
using Exceptionless.Models.Data;
1010
using Exceptionless.Serializer;
1111

12-
namespace Exceptionless.Tests.Utility
13-
{
14-
class ErrorDataReader
15-
{
16-
static IJsonSerializer GetSerializer()
17-
{
12+
namespace Exceptionless.Tests.Utility {
13+
public class ErrorDataReader {
14+
private static IJsonSerializer GetSerializer() {
1815
return new DefaultJsonSerializer();
1916
}
2017

21-
static Event GetEvent(string fileName)
22-
{
18+
private static Event GetEvent(string fileName) {
2319
var json = File.ReadAllText(fileName);
2420
var serializer = GetSerializer();
2521
var ev = serializer.Deserialize<Event>(json);
2622
ev.Data[Event.KnownDataKeys.Error] = ev.Data.GetValue<Error>(Event.KnownDataKeys.Error);
2723
return ev;
2824
}
25+
2926
public static IEnumerable<Event> GetEvents() {
30-
return Directory.EnumerateFiles(@"..\..\ErrorData", "*.json").Select(GetEvent);
27+
return Directory.EnumerateFiles(@"..\..\..\..\ErrorData", "*.json").Select(GetEvent);
3128
}
3229
}
3330
}

src/Exceptionless.Tests/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"xunit.runner.visualstudio": "2.1.0"
2626
},
2727
"frameworks": {
28-
"net452": {
28+
"net46": {
2929
"frameworkAssemblies": {
3030
"System.Threading.Tasks": "",
3131
"System.Runtime": ""

0 commit comments

Comments
 (0)