Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
CleanArchitecture
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
CleanArchitecture
Commits
6e652f69
Commit
6e652f69
authored
Jun 06, 2018
by
Scott DePouw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HomeControllerIndexShould now uses CustomWebApplicationFactory.
parent
8413066e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
HomeControllerIndexShould.cs
...ecture.Tests/Integration/Web/HomeControllerIndexShould.cs
+14
-6
No files found.
tests/CleanArchitecture.Tests/Integration/Web/HomeControllerIndexShould.cs
View file @
6e652f69
using
System.Threading.Tasks
;
using
CleanArchitecture.Web
;
using
System.Net.Http
;
using
System.Threading.Tasks
;
using
Xunit
;
namespace
CleanArchitecture.Tests.Integration.Web
{
public
class
HomeControllerIndexShould
:
BaseWebTest
public
class
HomeControllerIndexShould
:
IClassFixture
<
CustomWebApplicationFactory
<
Startup
>>
{
public
HttpClient
Client
{
get
;
}
public
HomeControllerIndexShould
(
CustomWebApplicationFactory
<
Startup
>
factory
)
{
Client
=
factory
.
CreateClient
();
}
[
Fact
]
public
async
Task
ReturnViewWithCorrectMessage
()
{
var
response
=
await
_c
lient
.
GetAsync
(
"/"
);
HttpResponseMessage
response
=
await
C
lient
.
GetAsync
(
"/"
);
response
.
EnsureSuccessStatusCode
();
var
stringResponse
=
await
response
.
Content
.
ReadAsStringAsync
();
string
stringResponse
=
await
response
.
Content
.
ReadAsStringAsync
();
Assert
.
Contains
(
"CleanArchitecture.Web"
,
stringResponse
);
}
}
}
\ No newline at end of file
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment