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 RestSharpXmlSerializer : RestSharp.Serializers.ISerializer | |
{ | |
public string Serialize(object obj) | |
{ | |
string retval = null; | |
if (obj != null) | |
{ | |
var sb = new StringBuilder(); | |
using (var writer = XmlWriter.Create(sb, new XmlWriterSettings() { OmitXmlDeclaration = true })) |
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
[Test] | |
public void proclaimer_falls_down_at_door() | |
{ | |
var proclaimer = nSubstitue.For<IProclaimer>(); | |
proclaimer.Walk500Miles().Returns("One thousand miles walked"); | |
var door = nSubstitue.For<IDoor>(); | |
var sut = new ProclaimerGoesAboutHisBusinessService(proclaimer, door); |
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 interface IJsonService<T> | |
{ | |
// Methods | |
void Delete(T entity); | |
IList<T> FindAll(IDictionary<string, object> propertyValuePairs, int pageNo, int resultsPerPage, string sortBy, string sortDirection); | |
T Get(int id); | |
IList<T> Get(List<int> IDs); | |
IList<T> GetAll(int pageNo, int resultsPerPage, string sortBy, string sortDirection, string segment); | |
RestResult Save(T entity); | |
RestResult Update(T entity); |
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 'rake' | |
require 'configatron' | |
require 'pp' | |
task :setEnvironmentVariables do | |
$env = ENV['environment'] | |
if $env.nil? | |
puts "Please enter an environment to deploy this build to." |
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 'rake' | |
require 'configatron' | |
require 'pp' | |
task :setEnvironmentVariables do | |
$env = ENV['environment'] | |
if $env.nil? | |
puts "Please enter an environment to deploy this build to." | |
fail |
NewerOlder