~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to external/ngit/NGit.Test/NGit.Api/DiffCommandTest.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
186
186
                        NUnit.Framework.Assert.AreEqual(expected.ToString(), actual);
187
187
                }
188
188
 
 
189
                /// <exception cref="System.Exception"></exception>
 
190
                [NUnit.Framework.Test]
 
191
                public virtual void TestNoOutputStreamSet()
 
192
                {
 
193
                        FilePath file = WriteTrashFile("test.txt", "a");
 
194
                        NUnit.Framework.Assert.IsTrue(file.SetLastModified(file.LastModified() - 5000));
 
195
                        Git git = new Git(db);
 
196
                        git.Add().AddFilepattern(".").Call();
 
197
                        Write(file, "b");
 
198
                        IList<DiffEntry> diffs = git.Diff().Call();
 
199
                        NUnit.Framework.Assert.IsNotNull(diffs);
 
200
                        NUnit.Framework.Assert.AreEqual(1, diffs.Count);
 
201
                        DiffEntry diff = diffs[0];
 
202
                        NUnit.Framework.Assert.AreEqual(DiffEntry.ChangeType.MODIFY, diff.GetChangeType()
 
203
                                );
 
204
                        NUnit.Framework.Assert.AreEqual("test.txt", diff.GetOldPath());
 
205
                        NUnit.Framework.Assert.AreEqual("test.txt", diff.GetNewPath());
 
206
                }
 
207
 
189
208
                /// <exception cref="System.IO.IOException"></exception>
190
209
                private AbstractTreeIterator GetTreeIterator(string name)
191
210
                {