public void Should_Generate_All_Arguments() { var settings = new PlasticSCMFindSettings() { RepositorySpecs = { "RepoSpec1", "RepoSpec2" }, WhereClause = "Date >= '2018-01-01:00:00:00'", ObjectType = PlasticSCMObjectTypes.Review }; FindFixture fixture = new FindFixture("find_changesets.xml") { Settings = settings }; var result = fixture.Run(); Assert.That(result.Args, Does.StartWith("find")); Assert.That(result.Args, Does.Contain($"where {settings.WhereClause}")); Assert.That(result.Args, Does.Contain($"on repositories {string.Join(",", settings.RepositorySpecs)}")); Assert.That(result.Args, Does.Contain("--dateformat=s")); Assert.That(result.Args, Does.Contain("--xml")); }
public static PlasticSCMFindResult PlasticSCMFind(this ICakeContext ctx, PlasticSCMFindSettings settings) { return(new PlasticSCMFindExecutor(ctx.FileSystem, ctx.Environment, ctx.ProcessRunner, ctx.Tools, ctx.Log) .Find(settings)); }