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.Collections.Generic; | |
using System.Text.RegularExpressions; | |
using System.Runtime.InteropServices; | |
using ESRI.ArcGIS.Geodatabase; | |
using ESRI.ArcGIS.Geometry; | |
using Blog.SoeExample.Model; | |
namespace Blog.SoeExample.Repository | |
{ |
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.Collections.Generic; | |
using ESRI.ArcGIS.Geodatabase; | |
using Blog.SoeExample.Model; | |
namespace Blog.SoeExample.Repository | |
{ | |
public interface IExampleRepository | |
{ | |
// workspace dependency |
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.Text; | |
using System.Collections.Generic; | |
using System.Collections.Specialized; | |
using ESRI.ArcGIS.Geodatabase; | |
using ESRI.ArcGIS.SOESupport; | |
using Blog.SoeExample.Repository; | |
namespace Blog.SoeExample.Service | |
{ |
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.Collections.Specialized; | |
using ESRI.ArcGIS.Geodatabase; | |
using ESRI.ArcGIS.SOESupport; | |
namespace Blog.SoeExample.Service | |
{ | |
public interface IExampleService | |
{ | |
// workspace dependency | |
IWorkspace Workspace { get; set; } |
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.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Collections.Specialized; | |
using System.Runtime.InteropServices; | |
using Castle.Windsor; | |
using Castle.Windsor.Installer; | |
using ESRI.ArcGIS.esriSystem; | |
using ESRI.ArcGIS.Server; |
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
// tests with mocked dependencies | |
[TestClass] | |
public class CheckoutTests | |
{ | |
private Mock<IPriceList> drinksMenu; | |
private Mock<IClock> clock; | |
private List<Order> orders; | |
[TestInitialize] |
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
// code that's testable | |
public class Checkout | |
{ | |
private IPriceList drinksMenu; | |
private IClock clock; | |
public Checkout(IPriceList drinksMenu, IClock clock) | |
{ | |
this.drinksMenu = drinksMenu; |
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
// code that's extremely difficult to test | |
public class Checkout | |
{ | |
public decimal CalculateCost(List<Order> orders) | |
{ | |
// get the price list | |
var drinksMenu = getDrinksMenu(); | |
var total = 0.0m; |
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
// code that's difficult to test | |
public class Checkout | |
{ | |
public decimal CalculateCost(List<Order> orders) | |
{ | |
// get the price list | |
var drinksMenu = getDrinksMenu(); | |
var total = 0.0m; |
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
dojo.require("esri.map"); | |
dojo.require("esri.layers.tiled"); | |
dojo.require("dojo/string"); | |
var map; | |
function init() { | |
dojo.declare("S3TiledMapServiceLayer", esri.layers.TiledMapServiceLayer, { | |