Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Mock session for integration test

$
0
0
How can I make session mock in integration test?

Here is example test method

[TestMethod]
public void Mvc_GetBlogsShouldBeOk()
{

// I need this
SessionMock.GetString("filter.name").Returns("David");
Client.GetAsync("/").Result.EnsureSuccessStatusCode();
}

Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>