public void TestSetConfiguration() { csvFileService = new DataControl.Services.CsvFileService(); DataControl.Interfaces.IDataAccessService dataAccessService = csvFileService.SetConfiguration(new DataControl.Services.FileConfiguration()); Assert.AreSame(csvFileService, dataAccessService); }
public void TestSetConfiguration() { using (DataBaseService dbService = new DataBaseService()) { DBConfiguration dbConfiguration = new DBConfiguration(connectionStringName); DataControl.Interfaces.IDataAccessService dataAccessService = dbService.SetConfiguration(dbConfiguration); Assert.AreSame(dbService, dataAccessService); } }
public MainWindow() { InitializeComponent(); /* * dataAccessService = new CsvFileService() * .SetConfiguration( * new FileConfiguration() * { * ClientFile = @"Resources\files\Client.csv", * DriverFile = @"Resources\files\Driver.csv", * RouteFile = @"Resources\files\Route.csv", * ScoreFile = @"Resources\files\Score.csv", * StreetFile = @"Resources\files\Street.csv", * }); */ dataAccessService = new DataBaseService().SetConfiguration( new DBConfiguration(connectionStringName: System.Configuration.ConfigurationManager .ConnectionStrings[CONNECTION_STRING_RESOURCE_NAME] .ConnectionString)); this.DataContext = new ApplicationViewModel(dataAccessService); }