public static ValidateOutputFormat ( string actualFileName, string expectedFileName ) : void | ||
actualFileName | string | |
expectedFileName | string | |
return | void |
public void OutputObjectFormatValidation() { string outputFile = Path.Combine(Directory.GetCurrentDirectory(), Guid.NewGuid() + ".txt"); string arguments = string.Format( "-subscriptionID \"{0}\" -serializedCert \"{1}\" -serverLocation \"{2}\" -OutputFile \"{3}\"", this.subscriptionID, this.serializedCert, this.serverLocation, outputFile); bool testResult = PSScriptExecutor.ExecuteScript(ServerTest.FormatValidationScript, arguments); Assert.IsTrue(testResult); OutputFormatValidator.ValidateOutputFormat(outputFile, @"Server\ExpectedFormat.txt"); }
public void OutputObjectFormatValidation() { string outputFile = Path.Combine(Directory.GetCurrentDirectory(), Guid.NewGuid() + ".txt"); string arguments = string.Format( CultureInfo.InvariantCulture, "-Name \"{0}\" -ManageUrl \"{1}\" -UserName \"{2}\" -Password \"{3}\" -OutputFile \"{4}\"", "testFormatdbfromcmdlet", SqlDatabaseTestSettings.Instance.ManageUrl, SqlDatabaseTestSettings.Instance.UserName, SqlDatabaseTestSettings.Instance.Password, outputFile); bool testResult = PSScriptExecutor.ExecuteScript(DatabaseTest.FormatValidationScript, arguments); Assert.IsTrue(testResult); OutputFormatValidator.ValidateOutputFormat(outputFile, @"Database\ExpectedFormat.txt"); }