public void ViewModelLoaderConfiguration_ConfigureViewLoaderWithInValidFormatNumbers(int formatNumber) { var fakeUnityContainer = new UnityContainer(); var fakeMenu = new FakeMenu(formatNumber); var viewModelLoaderConfiguration = new ViewModelLoaderConfiguration(fakeUnityContainer, fakeMenu); Assert.Throws <NotImplementedException>(() => viewModelLoaderConfiguration.Configure()); }
public void OutputFormatterConfiguration_ConfigureOutputFormatterWithInValidFormatNumbers(int formatNumber) { var fakeUnityContainer = new UnityContainer(); var fakeMenu = new FakeMenu(formatNumber); var outputFormatterConfiguration = new OutputFormatterConfiguration(fakeUnityContainer, fakeMenu); Assert.Throws <NotImplementedException>(() => outputFormatterConfiguration.Configure()); }
public void ViewModelLoaderConfiguration_ConfigureViewLoader_CheckInOfficeRangeComposerInContainer() { var fakeUnityContainer = new UnityContainer(); var fakeMenu = new FakeMenu(1); var viewModelLoaderConfiguration = new ViewModelLoaderConfiguration(fakeUnityContainer, fakeMenu); viewModelLoaderConfiguration.Configure(); var numberOfRegistration = fakeUnityContainer.Registrations.Where(x => x.RegisteredType == typeof(IInOfficeRangeComposer)).Count(); var expectedNumberOfRegistrations = 1; Assert.Equal(expectedNumberOfRegistrations, numberOfRegistration); }
public void ViewModelLoaderConfiguration_ConfigureViewLoaderWithValidFormatNumbers(int formatNumber) { var fakeUnityContainer = new UnityContainer(); var fakeMenu = new FakeMenu(formatNumber); var viewModelLoaderConfiguration = new ViewModelLoaderConfiguration(fakeUnityContainer, fakeMenu); viewModelLoaderConfiguration.Configure(); var numberOfRegistration = fakeUnityContainer.Registrations.Where(x => x.RegisteredType == typeof(IOfficerViewModelDataMapper)).Count(); var expectedNumberOfRegistrations = 1; Assert.Equal(expectedNumberOfRegistrations, numberOfRegistration); }
public void OutputFormatterConfiguration_ConfigureOutputFormatterWithValidFormatNumbers(int formatNumber) { var fakeUnityContainer = new UnityContainer(); var fakeMenu = new FakeMenu(formatNumber); var outputFormatterConfiguration = new OutputFormatterConfiguration(fakeUnityContainer, fakeMenu); outputFormatterConfiguration.Configure(); var numberOfRegistration = fakeUnityContainer.Registrations.Where(x => x.RegisteredType == typeof(IOutputFormatter)).Count(); var expectedNumberOfRegistrations = 1; Assert.Equal(expectedNumberOfRegistrations, numberOfRegistration); }
public void ReportConfigurator_Setup_CheckDataAccessInContainer() { IUnityContainer fakeUnityContainer = new UnityContainer(); string fakeFileName = "helloen.csv"; int fakeFormattedNumber = 1; IMenu fakeMenu = new FakeMenu(fakeFormattedNumber); var reportConfigurator = new ReportConfigurator(fakeUnityContainer, fakeFileName, fakeMenu); reportConfigurator.Setup(); var numberOfRegistration = fakeUnityContainer.Registrations.Where(x => x.RegisteredType == typeof(ICommonDataAccess)).Count(); var expectedNumberOfRegistrations = 1; Assert.Equal(expectedNumberOfRegistrations, numberOfRegistration); }