This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var runscopeHandler = new RunscopeMessageHandler("bucketKey", new HttpClientHandler()); | |
var httpClient = new HttpClient(runscopeHandler); | |
var response = await httpClient.GetAsync("https://api.github.com"); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var client = new HttpClient(); | |
var runscopeLink = new RunScopeLink() { | |
Target = new Uri("https://api.github.com"), | |
BucketKey = "bucket_key" | |
}; | |
var response = client.SendAsync(runscopeLink.CreateRequest()).Response; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Scenario] | |
public void RetrievingIssues(IEnumerable<Issue> issues, Mock<IIssueStore> issueStore ) | |
{ | |
var mockIssueStore = new Mock<IIssueStore>(); | |
var fakeIssues = GetFakeIssues(); | |
var controller = new IssueController(mockIssueStore.Object); | |
"Given existing issues". | |
f(() => mockIssueStore.Setup(i => i.FindAsync()).Returns(Task.FromResult(fakeIssues))); | |
"When a GET request is made for all issues". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class StringExtensionsSpecifications | |
{ | |
[Scenario] | |
[Example("Given", StepType.Given)] | |
[Example("When", StepType.When)] | |
[Example("Then", StepType.Then)] | |
[Example("But", StepType.But)] | |
[Example("And", StepType.And)] | |
public void GetStepType(string clause, StepType expected, StepType actual) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
namespace SimpleHttpClient | |
{ | |
class Program | |
{ | |
private static Uri url = new Uri("http://bing.com/"); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.Routes.Add("default", new TreeRoute("",new TreeRoute("home").To<HomeController>(), | |
new TreeRoute("contact", | |
new TreeRoute("{id}", | |
new TreeRoute("address", | |
new TreeRoute("{addressid}").To<ContactAddressController>()) | |
).To<ContactController>()) | |
) | |
); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Hpr> | |
<pages> | |
<page> | |
<type>DefFeatures</type> | |
<href>6.2/615/WW/en-us/0/76/features.json</href> | |
</page> | |
<page> | |
<type>MSFeatures</type> | |
<href>6.2.1.0/100/CA/en-us/MS/232/features9bc05c7c-e8b6-4341-a379-bc3d042e6458.json</href> | |
</page> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Net.Http; | |
using System.Web.Http; | |
using System.Web.Http.Routing; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
namespace TestRoutes | |
{ | |
[TestClass] | |
public class RouteTests { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BingMapLink : Link | |
{ | |
public BingMapLink() | |
{ | |
Target = new Uri("http://dev.virtualearth.net/REST/v1/Imagery/Map/Road/{lat},{long}/{level}?mapSize={mapsize}&key={apikey}"); | |
SetParameter("level", 10); | |
SetParameter("mapsize", "500, 500"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here's a report that show the weight of material currently being worked on... | |
SELECT CASE WHEN @@LANGID = 0 THEN cat.Description ELSE cat.Description_2 END AS ChargeAccountType, | |
ca.Code AS ChargeAccount_Code, | |
ca.Description AS ChargeAccount_Description, | |
ROUND(pw.TotalWeight / 2000.0,2) AS TotalWeight, | |
ROUND(pw.BoltWeight /2000.0,2) AS BoltWeight, | |
ROUND(pw.ReleasedWeight / 2000.0,2) AS ReleasedWeight, | |
ROUND(pw.FabricatedWeight / 2000.0,2) AS FabricatedWeight, |