Update openScmp to read file structure (#1952)

* Update openScmp to read file structure (and dsp) information from the scmp file.

* Address comments
This commit is contained in:
Sakshi Sharma
2023-04-04 11:05:36 -07:00
committed by GitHub
parent 3b175e2dd5
commit 098cf3be35
2 changed files with 57 additions and 17 deletions

View File

@@ -1859,17 +1859,19 @@ WITH VALUES
if (resultEndpoint.EndpointType == SchemaCompareEndpointType.Dacpac)
{
SchemaCompareDacpacEndpoint dacpacEndpoint = originalEndpoint as SchemaCompareDacpacEndpoint;
Assert.AreEqual(dacpacEndpoint.FilePath, resultEndpoint.PackageFilePath);
Assert.AreEqual(dacpacEndpoint.FilePath, resultEndpoint.PackageFilePath, "Package filepath didn't match");
}
else if (resultEndpoint.EndpointType == SchemaCompareEndpointType.Project)
{
SchemaCompareProjectEndpoint projectEndpoint = originalEndpoint as SchemaCompareProjectEndpoint;
Assert.AreEqual(projectEndpoint.ProjectFilePath, resultEndpoint.ProjectFilePath);
Assert.AreEqual(projectEndpoint.ProjectFilePath, resultEndpoint.ProjectFilePath, "ProjectFilePath didn't match");
Assert.AreEqual(resultEndpoint.ExtractTarget, DacExtractTarget.ObjectType, "Extract target didn't match");
Assert.AreEqual(resultEndpoint.DataSchemaProvider, "150", "Dsp didn't match");
}
else
{
SchemaCompareDatabaseEndpoint databaseEndpoint = originalEndpoint as SchemaCompareDatabaseEndpoint;
Assert.AreEqual(databaseEndpoint.DatabaseName, resultEndpoint.DatabaseName);
Assert.AreEqual(databaseEndpoint.DatabaseName, resultEndpoint.DatabaseName, "Database name didn't match");
}
}
@@ -2057,6 +2059,7 @@ WITH VALUES
result.ProjectFilePath = comparisonObjectPath;
result.TargetScripts = targetScripts;
result.DataSchemaProvider = "160";
result.ExtractTarget = DacExtractTarget.Schema;
break;
default:
throw new ArgumentException($"Unexpected endpoint type: {type}");