Rename the DataSource Factory
This commit is contained in:
parent
a76603f00c
commit
65d41e0faa
@ -19,7 +19,7 @@ namespace TeamHobby.HobbyProjectGenerator.ArchiveTests
|
||||
|
||||
|
||||
// [TestMethod]
|
||||
public void CreateFolderTest(IDataSource<string> sqlDAO)
|
||||
public void IsArchiveFolderCreated(IDataSource<string> sqlDAO)
|
||||
{
|
||||
// Arrange
|
||||
//SqlDAO sqlDAO = new SqlDAO(dbInfo);
|
||||
@ -51,7 +51,7 @@ namespace TeamHobby.HobbyProjectGenerator.ArchiveTests
|
||||
}
|
||||
|
||||
// [TestMethod]
|
||||
public void CreateFileNameTest(IDataSource<string> sqlDAO)
|
||||
public void IsFileNameCreated(IDataSource<string> sqlDAO)
|
||||
{
|
||||
// Arrange
|
||||
string foldPath = @"C:\HobbyArchive";
|
||||
@ -106,12 +106,12 @@ namespace TeamHobby.HobbyProjectGenerator.ArchiveTests
|
||||
|
||||
// Testing folder creation
|
||||
ArchivingTests test = new ArchivingTests();
|
||||
test.CreateFolderTest(sqlDAO);
|
||||
test.IsArchiveFolderCreated(sqlDAO);
|
||||
Console.WriteLine("-----------------");
|
||||
Console.WriteLine("");
|
||||
|
||||
// Testing file creation
|
||||
test.CreateFileNameTest(sqlDAO);
|
||||
test.IsFileNameCreated(sqlDAO);
|
||||
Console.WriteLine("-----------------");
|
||||
Console.WriteLine("");
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ using TeamHobby.HobbyProjectGenerator.DataAccess;
|
||||
|
||||
namespace TeamHobby.HobbyProjectGenerator.DataAccess
|
||||
{
|
||||
public class RelationalDataSourceFactory
|
||||
public class RDSFactory
|
||||
{
|
||||
// Mehthod to create a specific data source suitable to the need
|
||||
public IDataSource<string> getDataSource(string name, string info)
|
||||
@ -35,7 +35,7 @@ namespace TeamHobby.HobbyProjectGenerator.Main
|
||||
|
||||
// Creating the Factory class
|
||||
string dbType = "sql";
|
||||
RelationalDataSourceFactory dbFactory = new RelationalDataSourceFactory();
|
||||
RDSFactory dbFactory = new RDSFactory();
|
||||
|
||||
// Testing Data Access Layer
|
||||
string dbInfo = "DRIVER={MariaDB ODBC 3.1 Driver};" +
|
||||
|
||||
Loading…
Reference in New Issue
Block a user