protected override void Given() { resourceFileHelper = MockRepository.GenerateMock<IResourceFileHelper>(); resourceFileHelper.Stub(m => m.GetNameValuesFromSource("active")) .Return(new Dictionary<string, string> { { "Key_Inactive", "Inactive" } }); resourceFileHelper.Stub(m => m.GetNameValuesFromSource("inactive")) .Return(new Dictionary<string, string> { { "Key_Inactive", "Inactive" } }); resourceFileHelper.Stub(m => m.GetNameValuesFromSource("agent type")) .Return(new Dictionary<string, string> { { "Key_AgentType", "Agent Type" }, { "Key_Agent_Type", "Agent Type" }, { "Key_TypeOfAgent", "Agent Type" } }); var dispatchService = MockRepository.GenerateMock<IDispatchService>(); dispatchService.Stub(m => m.Invoke<MessageBoxResult>(null)).IgnoreArguments().Return(MessageBoxResult.Yes); excelFilePath = (Environment.CurrentDirectory + "\\SampleResourceFiles\\ExcelSample.xlsx"); testOutput = new List<TranslatedItem>(); sut = new ExcelTranslateEngine(dispatchService, item => SutToolOutput(this, new TranslatedItemEventArgs{ Item = item})); }
protected override void Given() { base.Given(); var dispatchService = MockRepository.GenerateMock<IDispatchService>(); dispatchService.Stub(m => m.Invoke<MessageBoxResult>(null)).IgnoreArguments().Return(MessageBoxResult.No); sut = new ExcelTranslateEngine(dispatchService, item => base.SutToolOutput(this, new TranslatedItemEventArgs { Item = item })); }