Skip to content

Commit 80333a9

Browse files
committed
Removed commented out code and unnecessary compiler directives
1 parent 7505d88 commit 80333a9

File tree

2 files changed

+0
-38
lines changed

2 files changed

+0
-38
lines changed

src/FluentAssertions.Mvc.Shared/JsonResultAssertions.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
using System.Text;
33
using FluentAssertions.Execution;
44
using FluentAssertions.Primitives;
5-
#if NETSTANDARD1_6
6-
using Microsoft.AspNetCore.Mvc;
7-
#else
85
using System.Web.Mvc;
9-
#endif
106

117
namespace FluentAssertions.Mvc
128
{
@@ -71,7 +67,6 @@ public JsonResultAssertions WithData(Func<object, bool> dataCondition, string re
7167
return this;
7268
}
7369

74-
#if !NETSTANDARD1_6
7570
/// <summary>
7671
/// Asserts that the content encoding is the expected content encoding type.
7772
/// </summary>
@@ -94,7 +89,5 @@ public JsonResultAssertions WithContentEncoding(Encoding expectedEncoding, strin
9489

9590
return this;
9691
}
97-
#endif
98-
9992
}
10093
}

tests/FluentAssertions.Mvc.Tests.Shared/JsonResultAssertions_Tests.cs

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@
33
using System.Linq;
44
using System.Text;
55
using NUnit.Framework;
6-
#if NETCOREAPP1_0
7-
using Microsoft.AspNetCore.Mvc;
8-
#else
96
using System.Web.Mvc;
10-
#endif
117

128
namespace FluentAssertions.Mvc.Tests
139
{
@@ -121,34 +117,8 @@ public void WithDataPredicate_ShouldFail()
121117
act.Should().Throw<Exception>().WithMessage(expectedMessage);
122118
}
123119

124-
//[Test]
125-
//public void WithData_DataIsDifferentObjectOfSameValue()
126-
//{
127-
// var actualData = new ObjectWithEquality("hello world");
128-
// var expectedData = new ObjectWithEquality("hello world");
129-
130-
// ActionResult result = new JsonResult { Data = actualData };
131-
132-
// result.Should().BeJsonResult().WithData(expectedData);
133-
//}
134-
135-
//[Test]
136-
//public void WithData_DataIsDifferentObjectOfDifferentValue()
137-
//{
138-
// var actualData = new ObjectWithEquality("hello world");
139-
// var expectedData = new ObjectWithEquality("goodbye cruel world");
140-
// var expectedMessage = string.Format(FailureMessages.CommonFailMessage, "JsonResult.Data", expectedData, actualData);
141-
142-
// ActionResult result = new JsonResult { Data = actualData };
143-
144-
// System.Action act = () => result.Should().BeJsonResult().WithData(expectedData);
145-
146-
// act.Should().Throw<Exception>().WithMessage(expectedMessage);
147-
//}
148-
149120
#endregion
150121

151-
#if !NETCOREAPP1_0
152122
[Test]
153123
public void WithContentEncoding_GivenExpected_ShouldPass()
154124
{
@@ -169,7 +139,6 @@ public void WithContentEncoding_GivenUnexpected_ShouldFail()
169139
a.Should().Throw<Exception>()
170140
.WithMessage(failureMessage);
171141
}
172-
#endif
173142

174143
private class ObjectWithEquality : IEquatable<ObjectWithEquality>
175144
{

0 commit comments

Comments
 (0)