public async Task Can_Read_Page() { var databaseConnection = new DatabaseConnection(); databaseConnection.ConnectionString = Properties.Settings.Default.TestDatabaseConnectionString; var reader = new DatabasePageReader(databaseConnection); var page = await reader.Read(11, new PageAddress(1, 632)); Assert.IsNotNull(page); Assert.IsNotNull(page.Data); Assert.AreEqual(0x01, page.Data[0]); Assert.AreEqual(0x11, page.Data[8191]); }
public async Task Can_Load_Test_Database() { var databaseConnection = new DatabaseConnection(); databaseConnection.ConnectionString = Properties.Settings.Default.TestDatabaseConnectionString; var metadataService = new MetadataService(databaseConnection); var pageReader = new DatabasePageReader(databaseConnection); var pageFreeSpaceService = new PageFreeSpaceService(pageReader); var allocationService = new AllocationService(pageReader); var iamService = new IndexAllocationMapService(pageReader); var service = new DatabaseService(metadataService, allocationService, pageFreeSpaceService, iamService); var result = await service.GetDatabase("InternalsViewerTests"); }