public void Init() { INumberToTextLanguageFormatter convertorLanguageFormater = new CustomEnglishWithDollarFormatter(); INumberToTextConvertor numberConvertor = new NumberToTextConvertor(convertorLanguageFormater); _controller = new ChequeController(numberConvertor); }
public void Initialize() { _chequeDetails = new ChequeDetails(); mockService = new Moq.Mock <IChequeService>(); _chequeController = new ChequeController(mockService.Object); _chequeController.Request = new HttpRequestMessage(); _chequeController.Configuration = new HttpConfiguration(); }
public void TestInitialize() { configProvider = Substitute.For <IConfigProvider>(); DatabaseConnectionString = GetIntegrationTestConnectionString(); configProvider.GetConnectionString().Returns(DatabaseConnectionString); chequeComponent = new ChequeComponent(); chequeData = new ChequeData(configProvider); chequeController = new ChequeController(chequeComponent, chequeData); client = new HttpClient() { BaseAddress = GetRequestUrl() }; client.DefaultRequestHeaders.Accept.Clear(); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); }
public void Seed() { ChequeController chequeController = new ChequeController(new HttpClientProvider()); ChequeRequest cheque1 = new ChequeRequest { ChequeAmount = 125.50m, PersonName = "John Smith" }; chequeController.AddSampleCheque(cheque1); ChequeRequest cheque2 = new ChequeRequest { ChequeAmount = 400.20m, PersonName = "Mary Brown" }; chequeController.AddSampleCheque(cheque2); }
public void CleanUp() { _chequeDetails = null; _chequeController = null; }