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
/** | |
* Make a request to a specific URL using a method | |
* @param {string} url | |
* @param {string} method | |
*/ | |
var makeRequestDocumented = function (url, method) { | |
// make a request | |
}; |
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
require(["mathFunctions"], function (math) { | |
console.log(math.add(5,3)); | |
console.log(math.subtract(10, 3)); | |
}); |
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 When_baseuri_is_null_and_query_is_null | |
{ | |
Establish context = () => | |
{ | |
uriComposer = new UriComposer(); | |
query = null; | |
baseUri = null; | |
}; | |
Because of = () => url = uriComposer.Compose(baseUri, query, uri); |
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
void InitRequest(string uri, object query, HttpMethod method) | |
{ | |
Request.Uri = !String.IsNullOrEmpty(_baseUri) ? _uriComposer.Compose(_baseUri, uri, query): uri; | |
Request.Data = null; | |
Request.PutFilename = String.Empty; | |
Request.Expect = false; | |
Request.KeepAlive = true; | |
Request.MultiPartFormData = null; | |
Request.MultiPartFileData = null; | |
Request.ContentEncoding = null; |
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
function logger(options) { | |
if ('object' == typeof options) { | |
options = options || {}; | |
} else if (options) { | |
options = { format: options }; | |
} else { | |
options = {}; | |
} |
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
function logger(options) { | |
if ('object' == typeof options) { | |
options = options || {}; | |
} else if (options) { | |
options = { format: options }; | |
} else { | |
options = {}; | |
} |
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
describe('Farting', function () { | |
describe('when shaking the phone with my hands', function () { | |
it('a farting sound should appear', function (done) { | |
// TODO: Implement Fart | |
done(); | |
}); | |
}); |
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 a_response_that_contains_umlats | |
{ | |
Because of = () => | |
{ | |
var http = new HttpClient(); | |
http.Request.Accept = HttpContentTypes.ApplicationJson; | |
response = http.Get("https://api.github.com/users/thecodejunkie"); |
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
[Subject("Encoding Enums")] | |
public class when_encoding_an_object_that_contains_an_enum | |
{ | |
Establish context = () => | |
{ | |
IEnumerable<IDataReader> readers = new List<IDataReader> { new JsonReader(new DataReaderSettings(), "application/.*json") }; | |
IEnumerable<IDataWriter> writers = new List<IDataWriter> { new JsonWriter(new DataWriterSettings(), "application/.*json") }; | |
codec = new DefaultCodec(new RegExBasedDataReaderProvider(readers), new RegExBasedDataWriterProvider(writers)); |
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
_routeConventions.MapAction("Create").WithNoParameters().ToCustomUrl("/new").ConstraintToVerb(HttpVerbs.Get); |