Reformat code
This commit is contained in:
@@ -11,13 +11,13 @@ public class FrmEchoTests
|
||||
{
|
||||
FakeWebContext fakeWebContext = new();
|
||||
FrmEcho frmEcho = new();
|
||||
|
||||
|
||||
frmEcho.ProcessRequest(fakeWebContext);
|
||||
|
||||
Assert.Equal(200, fakeWebContext.ResponseStatusCode);
|
||||
string result = fakeWebContext.FakeWritePackages.ToString("");
|
||||
Assert.Equal(
|
||||
expected: """
|
||||
expected: """
|
||||
<pre><code>
|
||||
Header:{ }
|
||||
Query:{ }
|
||||
@@ -26,20 +26,20 @@ public class FrmEchoTests
|
||||
""",
|
||||
actual: result);
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public void ProcessRequest__OneQueryParameterGet__FormData()
|
||||
{
|
||||
FakeWebContext fakeWebContext = new();
|
||||
fakeWebContext.RequestQuery.Add("Test", "Value");
|
||||
FrmEcho frmEcho = new();
|
||||
|
||||
|
||||
frmEcho.ProcessRequest(fakeWebContext);
|
||||
|
||||
Assert.Equal(200, fakeWebContext.ResponseStatusCode);
|
||||
string result = fakeWebContext.FakeWritePackages.ToString("");
|
||||
Assert.Equal(
|
||||
expected: """
|
||||
expected: """
|
||||
<pre><code>
|
||||
Header:{ }
|
||||
Query:{ "Test": "Value" }
|
||||
@@ -48,20 +48,20 @@ public class FrmEchoTests
|
||||
""",
|
||||
actual: result);
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public void ProcessRequest__OneFormParameterPost__FormData()
|
||||
{
|
||||
FakeWebContext fakeWebContext = new(requestMethod: "POST");
|
||||
fakeWebContext.RequestForm.Add("Test", "Value");
|
||||
FrmEcho frmEcho = new();
|
||||
|
||||
|
||||
frmEcho.ProcessRequest(fakeWebContext);
|
||||
|
||||
Assert.Equal(200, fakeWebContext.ResponseStatusCode);
|
||||
string result = fakeWebContext.FakeWritePackages.ToString("");
|
||||
Assert.Equal(
|
||||
expected: """
|
||||
expected: """
|
||||
<pre><code>
|
||||
Header:{ }
|
||||
Query:{ }
|
||||
|
||||
@@ -11,13 +11,13 @@ public class FrmErrorTests
|
||||
{
|
||||
FakeWebContext fakeWebContext = new();
|
||||
FrmError frmError = new(new Exception("Test"));
|
||||
|
||||
|
||||
frmError.ProcessRequest(fakeWebContext);
|
||||
|
||||
Assert.Equal(200, fakeWebContext.ResponseStatusCode);
|
||||
string result = fakeWebContext.FakeWritePackages.ToString("");
|
||||
Assert.Equal(
|
||||
expected: """
|
||||
expected: """
|
||||
<!DOCTYPE html>
|
||||
<html ><head ><title>Application Error</title><meta content="IE=Edge" http-equiv="X-UA-Compatible" /><meta content="text/html; charset=utf-8" http-equiv="content-type" /><meta name="author" /><meta name="Copyright" /><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=4, user-scalable=1" /><script type="text/javascript" src="ScriptsBundler?v=1.0.0.0"></script>
|
||||
<link href="StylesBundler?v=1.0.0.0" type="text/css" rel="stylesheet"/>
|
||||
@@ -25,5 +25,4 @@ public class FrmErrorTests
|
||||
""",
|
||||
actual: result);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,10 +11,7 @@ public class PageCommonTests
|
||||
|
||||
private class TestEmptyForm : PageCommon
|
||||
{
|
||||
public TestEmptyForm(bool mustBeAuthenticated)
|
||||
{
|
||||
MustBeAuthenticated = mustBeAuthenticated;
|
||||
}
|
||||
public TestEmptyForm(bool mustBeAuthenticated) { MustBeAuthenticated = mustBeAuthenticated; }
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
@@ -75,10 +75,7 @@ public class PageTests
|
||||
Page page = new();
|
||||
page.Load += (_, _) =>
|
||||
{
|
||||
if (page.IsPostBack)
|
||||
{
|
||||
fakeWebContext.FakeSetResponseHasStarted(true);
|
||||
}
|
||||
if (page.IsPostBack) { fakeWebContext.FakeSetResponseHasStarted(true); }
|
||||
};
|
||||
|
||||
page.ProcessRequest(fakeWebContext);
|
||||
@@ -96,10 +93,7 @@ public class PageTests
|
||||
Page page = new();
|
||||
page.Load += (_, _) =>
|
||||
{
|
||||
if (page.IsPostBack)
|
||||
{
|
||||
fakeWebContext.FakeSetResponseHasStarted(true);
|
||||
}
|
||||
if (page.IsPostBack) { fakeWebContext.FakeSetResponseHasStarted(true); }
|
||||
};
|
||||
|
||||
page.ProcessRequest(fakeWebContext);
|
||||
|
||||
Reference in New Issue
Block a user