AddRepositoryString() публичный Метод

public AddRepositoryString ( string repository ) : void
repository string
Результат void
Пример #1
0
		public async Task GetAnAttributeTest()
		{
			var attributeBuilder = new AttributeFindFilterBuilder();
			attributeBuilder.AddSourceObject(new[] {3});
			attributeBuilder.AddRepositoryString(new[] {PlasticTestHelpers.LibGit2Workspace.Repository});
			var res = await Plastic.GetAttributesAsync(attributeBuilder.ToString(), Environment.CurrentDirectory);
			Assert.AreEqual(1, res.Count);
			Assert.AreEqual("sync-git", res[0].Type);
		}
Пример #2
0
		public void GetAnAttributeCommandLineTest()
		{
			using (new ProcessControllerFactoryRestorer(new FakeProcessControlFactory()))
			{
				var processControl = new FakeProcessObserver<AttributeInfo>();
				var attributeBuilder = new AttributeFindFilterBuilder();
				attributeBuilder.AddDateRange(new DateTime(2013, 10, 10), new DateTime(2013, 10, 15));
				attributeBuilder.AddRepositoryString(new[] {PlasticTestHelpers.LibGit2Workspace.Repository});
				Plastic.GetAttributes(attributeBuilder.ToString(), Environment.CurrentDirectory, processControl,
					CancellationToken.None);
				Assert.AreEqual(
					"cm.exe find attribute where date between '2013-10-10T00:00:00.0000000+02:00' and '2013-10-15T00:00:00.0000000+02:00' on repository 'libgit2@localhost:8087' --xml --encoding=utf-8",
					processControl.CommandLine);
				Assert.AreEqual(Environment.CurrentDirectory, processControl.WorkingDir);
			}
		}