本文整理汇总了C#中System.Proxy.DeleteAll方法的典型用法代码示例。如果您正苦于以下问题:C# Proxy.DeleteAll方法的具体用法?C# Proxy.DeleteAll怎么用?C# Proxy.DeleteAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Proxy
的用法示例。
在下文中一共展示了Proxy.DeleteAll方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DocumentationTests
public DocumentationTests()
{
var processes = System.Diagnostics.Process.GetProcessesByName("Moksy.Host");
Assert.AreEqual(1, processes.Length, "Moksy.Host is not running. Right click the Moksy.Host project, add 10011 to the Debug / Command Line Arguments and then run Moksy.Host without a debugger. Then try to run this test again. ");
Proxy = new Proxy(PortNumber);
Assert.IsTrue(Proxy.Start(), string.Format("Moksy could not start. Try to manually launch 'Moksy.Host.exe {0}' from the Command Line. ", PortNumber));
Proxy.DeleteAll();
}
示例2: Initialize
public void Initialize()
{
Proxy = new Proxy(10011);
Proxy.DeleteAll();
// Post
var s = SimulationFactory.When.I.Post().ToImdb("/Pet/{Kind}/Toy/{Name}/Price", "owner").AsJson().And.NotExists("{Ranking}").Then.AddToImdb().And.Return.StatusCode(System.Net.HttpStatusCode.Created);
Proxy.Add(s);
s = SimulationFactory.When.I.Post().ToImdb("/Pet/{Kind}/Toy/{Name}/Price", "owner").AsJson().And.Exists("{Ranking}").Then.Return.StatusCode(System.Net.HttpStatusCode.Conflict);
Proxy.Add(s);
// Put
s = SimulationFactory.When.I.Put().ToImdb("/Pet/{Kind}/Toy/{Name}/Price", "owner").AsJson().And.NotExists("{Ranking}").Then.Return.StatusCode(System.Net.HttpStatusCode.Created).Then.AddToImdb();
Proxy.Add(s);
s = SimulationFactory.When.I.Put().ToImdb("/Pet/{Kind}/Toy/{Name}/Price", "owner").AsJson().And.Exists("{Ranking}").Then.Return.StatusCode(System.Net.HttpStatusCode.PartialContent).Then.AddToImdb();
Proxy.Add(s);
s = SimulationFactory.When.I.Put().ToImdb("/Pet/{Kind}/Toy/{Name}/Price/{Ranking}", "owner").AsJson().And.NotExists("{Ranking}").Then.Return.StatusCode(System.Net.HttpStatusCode.Unauthorized).Then.AddToImdb();
Proxy.Add(s);
s = SimulationFactory.When.I.Put().ToImdb("/Pet/{Kind}/Toy/{Name}/Price/{Ranking}", "owner").AsJson().And.Exists("{Ranking}").Then.Return.StatusCode(System.Net.HttpStatusCode.UnsupportedMediaType).Then.AddToImdb();
Proxy.Add(s);
// GetById
s = SimulationFactory.When.I.Get().FromImdb("/Pet/{Kind}/Toy/{Name}/Price/{Ranking}", "owner").AsJson().And.Exists("{Ranking}").Then.Return.StatusCode(System.Net.HttpStatusCode.OK).And.Body("{value}");
Proxy.Add(s);
s = SimulationFactory.When.I.Get().FromImdb("/Pet/{Kind}/Toy/{Name}/Price/{Ranking}", "owner").AsJson().And.NotExists("{Ranking}").Then.Return.StatusCode(System.Net.HttpStatusCode.NotFound);
Proxy.Add(s);
// Get All
s = SimulationFactory.When.I.Get().FromImdb("/Pet/{Kind}/Toy/{Name}/Price", "owner").AsJson().Then.Return.StatusCode(System.Net.HttpStatusCode.PaymentRequired).And.Body("[{value}]");
Proxy.Add(s);
}
示例3: Initialize
public void Initialize()
{
Proxy = new Proxy(10011);
Proxy.DeleteAll();
var all = Proxy.GetAll();
Assert.AreEqual(0, all.Count);
}
示例4: Initialize
public void Initialize()
{
Proxy = new Proxy(10011);
Proxy.DeleteAll();
}