-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRemoteFakeServerTest.cs
More file actions
104 lines (90 loc) · 3.38 KB
/
RemoteFakeServerTest.cs
File metadata and controls
104 lines (90 loc) · 3.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
using System;
using FakeServers;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using FakeServers.Http;
using Microsoft.VisualStudio.TestTools.UnitTesting.Web;
namespace FakeHttpServerTests
{
[TestClass]
public class RemoteFakeServerTest : TestsForAnyIFakeServer
{
const string LISTENED_FAKE_SERVER_HOST = "http://localhost:4500/";
protected override string ListenedFakeServerURL { get { return LISTENED_FAKE_SERVER_HOST; } }
protected string RemotServerManagerHost
{
get
{
return TestContext.Properties["AspNetDevelopmentServer.FakeServerManager"].ToString() + "ServerManager.asmx";
}
}
private TestContext testContextInstance;
/// <summary>
///Gets or sets the test context which provides
///information about and functionality for the current test run.
///</summary>
public TestContext TestContext
{
get
{
return testContextInstance;
}
set
{
testContextInstance = value;
}
}
private IFakeServer SoapRemoteFakeServer;
protected override IFakeServer BuildTestingServer()
{
SoapRemoteFakeServer = SoapHttpRemoteServer.TakeListenHost(ListenedFakeServerURL, RemotServerManagerHost);
return SoapRemoteFakeServer;
}
[TestCleanup]
public void AfterEachTest()
{
SoapRemoteFakeServer.Dispose();
}
[TestInitialize]
public void InconclusiveThisTests()
{
Assert.Inconclusive();
}
[TestMethod]
[AspNetDevelopmentServer("FakeServerManager", "../../../FakeServerManager/", "/")]
[ExpectedException(typeof(Exception))]
public void RemoteFakeServer_should_verified_received_request()
{
base.any_IFakeServer_should_verified_received_request();
}
[TestMethod]
[AspNetDevelopmentServer("FakeServerManager", "../../../FakeServerManager/", "/")]
public void RemoteFakeServer_should_return_set_response()
{
base.any_IFakeServer_should_return_set_response();
}
[TestMethod]
[AspNetDevelopmentServer("FakeServerManager", "../../../FakeServerManager/", "/")]
public void RemoteFakeServer_should_stop_without_exception()
{
base.any_IFakeServer_should_stop_without_exception();
}
[TestMethod]
[AspNetDevelopmentServer("FakeServerManager", "../../../FakeServerManager/", "/")]
public void RemoteFakeServer_should_return_set_response_headers()
{
base.any_IFakeServer_should_return_set_response_headers();
}
[TestMethod]
[AspNetDevelopmentServer("FakeServerManager", "../../../FakeServerManager/", "/")]
public void RemoteFakeServer_should_able_to_get_history_of_ricivers_messages()
{
base.any_IFakeServer_should_able_to_get_history_of_ricivers_messages();
}
[TestMethod]
[AspNetDevelopmentServer("FakeServerManager", "../../../FakeServerManager/", "/")]
public void RemoteFakeServer_should_return_deffault_message_for_no_mathced_requests()
{
base.any_IFakeServer_should_return_deffault_message_for_no_mathced_requests();
}
}
}