本文整理汇总了C#中NGit.Api.Git.TagDelete方法的典型用法代码示例。如果您正苦于以下问题:C# Git.TagDelete方法的具体用法?C# Git.TagDelete怎么用?C# Git.TagDelete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NGit.Api.Git
的用法示例。
在下文中一共展示了Git.TagDelete方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestDelete
public virtual void TestDelete()
{
Git git = new Git(db);
git.Commit().SetMessage("initial commit").Call();
RevTag tag = git.Tag().SetName("tag").Call();
NUnit.Framework.Assert.AreEqual(1, db.GetTags().Count);
IList<string> deleted = git.TagDelete().SetTags(tag.GetTagName()).Call();
NUnit.Framework.Assert.AreEqual(1, deleted.Count);
NUnit.Framework.Assert.AreEqual(tag.GetTagName(), Repository.ShortenRefName(deleted
[0]));
NUnit.Framework.Assert.AreEqual(0, db.GetTags().Count);
RevTag tag1 = git.Tag().SetName("tag1").Call();
RevTag tag2 = git.Tag().SetName("tag2").Call();
NUnit.Framework.Assert.AreEqual(2, db.GetTags().Count);
deleted = git.TagDelete().SetTags(tag1.GetTagName(), tag2.GetTagName()).Call();
NUnit.Framework.Assert.AreEqual(2, deleted.Count);
NUnit.Framework.Assert.AreEqual(0, db.GetTags().Count);
}
示例2: TestDeleteBadName
public virtual void TestDeleteBadName()
{
Git git = new Git(db);
git.Commit().SetMessage("initial commit").Call();
IList<string> deleted = git.TagDelete().SetTags("bad~tag~name").Call();
NUnit.Framework.Assert.AreEqual(0, deleted.Count);
}
示例3: TestDeleteFullName
public virtual void TestDeleteFullName()
{
Git git = new Git(db);
git.Commit().SetMessage("initial commit").Call();
Ref tagRef = git.Tag().SetName("tag").Call();
NUnit.Framework.Assert.AreEqual(1, db.GetTags().Count);
IList<string> deleted = git.TagDelete().SetTags(Repository.ShortenRefName(tagRef.
GetName())).Call();
NUnit.Framework.Assert.AreEqual(1, deleted.Count);
NUnit.Framework.Assert.AreEqual(tagRef.GetName(), deleted[0]);
NUnit.Framework.Assert.AreEqual(0, db.GetTags().Count);
}
示例4: TestDelete
public virtual void TestDelete()
{
Git git = new Git(db);
git.Commit().SetMessage("initial commit").Call();
Ref tagRef = git.Tag().SetName("tag").Call();
NUnit.Framework.Assert.AreEqual(1, db.GetTags().Count);
IList<string> deleted = git.TagDelete().SetTags(tagRef.GetName()).Call();
NUnit.Framework.Assert.AreEqual(1, deleted.Count);
NUnit.Framework.Assert.AreEqual(tagRef.GetName(), deleted[0]);
NUnit.Framework.Assert.AreEqual(0, db.GetTags().Count);
Ref tagRef1 = git.Tag().SetName("tag1").Call();
Ref tagRef2 = git.Tag().SetName("tag2").Call();
NUnit.Framework.Assert.AreEqual(2, db.GetTags().Count);
deleted = git.TagDelete().SetTags(tagRef1.GetName(), tagRef2.GetName()).Call();
NUnit.Framework.Assert.AreEqual(2, deleted.Count);
NUnit.Framework.Assert.AreEqual(0, db.GetTags().Count);
}
示例5: TestDeleteFullName
public virtual void TestDeleteFullName()
{
Git git = new Git(db);
git.Commit().SetMessage("initial commit").Call();
RevTag tag = git.Tag().SetName("tag").Call();
NUnit.Framework.Assert.AreEqual(1, db.GetTags().Count);
IList<string> deleted = git.TagDelete().SetTags(Constants.R_TAGS + tag.GetTagName
()).Call();
NUnit.Framework.Assert.AreEqual(1, deleted.Count);
NUnit.Framework.Assert.AreEqual(Constants.R_TAGS + tag.GetTagName(), deleted[0]);
NUnit.Framework.Assert.AreEqual(0, db.GetTags().Count);
}