/Mercurial.Net.Tests/RollbackTests.cs
# · C# · 29 lines · 25 code · 4 blank · 0 comment · 0 complexity · 982b6ef49a93605839af98c346d0f40a MD5 · raw file
- using System.Linq;
- using NUnit.Framework;
-
- namespace Mercurial.Tests
- {
- [TestFixture]
- public class RollbackTests : SingleRepositoryTestsBase
- {
- [Test]
- [Category("Integration")]
- public void Rollback_NoRepo_ThrowsMercurialExecutionException()
- {
- Assert.Throws<MercurialExecutionException>(() => Repo.Rollback());
- }
-
- [Test]
- [Category("Integration")]
- public void Rollback_OneChangeset_RemovesChangeset()
- {
- Repo.Init();
- WriteTextFileAndCommit(Repo, "test.txt", "test", "test", true);
- Repo.Rollback();
-
- Changeset[] log = Repo.Log().ToArray();
-
- Assert.That(log, Is.Empty);
- }
- }
- }