public void Variant() { var path = Path.Combine(TestContext.CurrentContext.TestDirectory, "ScriptBuilder.Tests.dll"); var assemblyResolver = new DefaultAssemblyResolver(); assemblyResolver.AddSearchDirectory(TestContext.CurrentContext.TestDirectory); var readerParameters = new ReaderParameters(ReadingMode.Deferred) { AssemblyResolver = assemblyResolver }; var module = ModuleDefinition.ReadModule(path, readerParameters); ObjectApprover.VerifyWithJson(SqlVariantReader.Read(module).ToList()); }
public void Execute() { var moduleDefinition = ModuleDefinition.ReadModule(assemblyPath, new ReaderParameters(ReadingMode.Deferred)); var scriptPath = Path.Combine(intermediateDirectory, "NServiceBus.Persistence.Sql"); DirectoryExtensions.Delete(scriptPath); foreach (var variant in SqlVariantReader.Read(moduleDefinition)) { var variantPath = Path.Combine(scriptPath, variant.ToString()); Write(moduleDefinition, variant, variantPath); } PromoteFiles(moduleDefinition, scriptPath); }