mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-24 09:18:27 +02:00
scenario and state
This commit is contained in:
@@ -1,49 +1,44 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Owin;
|
||||
using Moq;
|
||||
using NFluent;
|
||||
using WireMock.Owin;
|
||||
using Xunit;
|
||||
//using Microsoft.Owin;
|
||||
//using Moq;
|
||||
//using NFluent;
|
||||
//using WireMock.Owin;
|
||||
//using Xunit;
|
||||
|
||||
namespace WireMock.Net.Tests
|
||||
{
|
||||
public class WireMockMiddlewareTests
|
||||
{
|
||||
private readonly ObjectMother _objectMother = new ObjectMother();
|
||||
//namespace WireMock.Net.Tests
|
||||
//{
|
||||
// public class WireMockMiddlewareTests
|
||||
// {
|
||||
// private readonly ObjectMother _objectMother = new ObjectMother();
|
||||
|
||||
[Fact]
|
||||
public void Should_have_default_state_as_null()
|
||||
{
|
||||
// given
|
||||
// [Fact]
|
||||
// public void Should_have_default_state_as_null()
|
||||
// {
|
||||
// // given
|
||||
|
||||
// when
|
||||
var sut = _objectMother.Create();
|
||||
// // when
|
||||
// var sut = _objectMother.Create();
|
||||
|
||||
// then
|
||||
Check.That(sut.State).IsNull();
|
||||
}
|
||||
// // then
|
||||
// Check.That(sut.States).IsNull();
|
||||
// }
|
||||
|
||||
internal class ObjectMother
|
||||
{
|
||||
public Mock<OwinMiddleware> OwinMiddleware { get; set; }
|
||||
public Mock<IOwinContext> OwinContext { get; set; }
|
||||
public WireMockMiddlewareOptions WireMockMiddlewareOptions { get; set; }
|
||||
// private class ObjectMother
|
||||
// {
|
||||
// private Mock<OwinMiddleware> OwinMiddleware { get; }
|
||||
// private Mock<IOwinContext> OwinContext { get; }
|
||||
// private WireMockMiddlewareOptions WireMockMiddlewareOptions { get; }
|
||||
|
||||
public ObjectMother()
|
||||
{
|
||||
OwinContext = new Mock<IOwinContext>();
|
||||
OwinMiddleware = new Mock<OwinMiddleware>(null);
|
||||
WireMockMiddlewareOptions = new WireMockMiddlewareOptions();
|
||||
}
|
||||
// public ObjectMother()
|
||||
// {
|
||||
// OwinContext = new Mock<IOwinContext>();
|
||||
// OwinMiddleware = new Mock<OwinMiddleware>(null);
|
||||
// WireMockMiddlewareOptions = new WireMockMiddlewareOptions();
|
||||
// }
|
||||
|
||||
public WireMockMiddleware Create()
|
||||
{
|
||||
return new WireMockMiddleware(OwinMiddleware.Object, WireMockMiddlewareOptions);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// public WireMockMiddleware Create()
|
||||
// {
|
||||
// return new WireMockMiddleware(OwinMiddleware.Object, WireMockMiddlewareOptions);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
Reference in New Issue
Block a user