public void VerifyXMLReportAgainstMultipleFilesAndPolicies() { using (new WsActivationContext()) { using (AdditionalResultsWorker resultWriter = new AdditionalResultsWorker("MTA_Multiple_Policy_And_Document_TestsIsThisParamRedundant")) { VerifyMultipleFilesAndPolicies(PathHelpers.RootDirectoryForMTAReportTests, resultWriter); } } }
public void InitialiseSuite() { m_eSender.DeleteOutlookTemporaryFiles(); m_outlookApplication = m_eSender.Initialise(); // NO LoadOnlyDefaultPolicy(); On EAT use the default // want to concatenate results from all of these tests m_earw = new AdditionalResultsWorker("TestEmails_EATTest"); testDataDir = TestDataDirectoryManager.GetBranchAwareDataRootDirectoryByTest("TestHygienePolicies"); }
//[TestFixtureSetUp] public void FixtureSetUp() { m_helper = new EmailMessageHelper(GetTraceTestFileLocation() + "TraceMail.pst", "Trace Test Mails"); if (RunningUnderEAT()) { m_earw = new AdditionalResultsWorker("TraceAcceptanceTests"); } else { ThinstallBuildTrace(); } }
void VerifyMultipleFilesAndPolicies(string rootDirectory, AdditionalResultsWorker resultWriter) { foreach (string directory in Directory.GetDirectories(rootDirectory)) { if (directory.EndsWith(".svn", StringComparison.InvariantCultureIgnoreCase)) continue; IUroPolicyEngine engine = MTAReportHelpersFactory.CreateUroPolicyEngineWithPolicyCache(PathHelpers.Concatenate(directory, "Policies")); IUniversalRequestObject uro = MTAReportHelpersFactory.CreateUro(new DirectoryBasedRequestAttachmentProvider(PathHelpers.Concatenate(directory, "Files"))); // DirectoryName should be a good indicator of the test name. string testName = directory.Substring(directory.LastIndexOf(Path.DirectorySeparatorChar) + 1); EATResultInfo info = new EATResultInfo(resultWriter, testName); IPolicyEngineTestAction action = TestActionFactory.CreateGenerateReportAndVerifyForEATAction(engine, PathHelpers.Concatenate(directory, "result.xml"), info); action.Execute(uro); } }
public EATResultInfo(AdditionalResultsWorker resultWriter, string testName) { ResultWriter = resultWriter; TestName = testName; }