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

« back to all changes in this revision

Viewing changes to external/ngit/NGit.Test/NGit.Api/CommitAndLogCommandTests.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:
57
57
        [NUnit.Framework.TestFixture]
58
58
        public class CommitAndLogCommandTests : RepositoryTestCase
59
59
        {
60
 
                /// <exception cref="NGit.Api.Errors.NoHeadException"></exception>
61
 
                /// <exception cref="NGit.Api.Errors.NoMessageException"></exception>
62
 
                /// <exception cref="NGit.Api.Errors.ConcurrentRefUpdateException"></exception>
63
60
                /// <exception cref="NGit.Api.Errors.JGitInternalException"></exception>
64
 
                /// <exception cref="NGit.Api.Errors.WrongRepositoryStateException"></exception>
65
61
                /// <exception cref="System.IO.IOException"></exception>
 
62
                /// <exception cref="NGit.Api.Errors.GitAPIException"></exception>
66
63
                [NUnit.Framework.Test]
67
64
                public virtual void TestSomeCommits()
68
65
                {
102
99
                }
103
100
 
104
101
                /// <exception cref="System.IO.IOException"></exception>
105
 
                /// <exception cref="NGit.Api.Errors.NoFilepatternException"></exception>
106
 
                /// <exception cref="NGit.Api.Errors.NoHeadException"></exception>
107
 
                /// <exception cref="NGit.Api.Errors.NoMessageException"></exception>
108
 
                /// <exception cref="NGit.Api.Errors.ConcurrentRefUpdateException"></exception>
109
102
                /// <exception cref="NGit.Api.Errors.JGitInternalException"></exception>
110
 
                /// <exception cref="NGit.Api.Errors.WrongRepositoryStateException"></exception>
 
103
                /// <exception cref="NGit.Api.Errors.GitAPIException"></exception>
111
104
                [NUnit.Framework.Test]
112
105
                public virtual void TestLogWithFilter()
113
106
                {
157
150
                }
158
151
 
159
152
                // try to do a commit without specifying a message. Should fail!
160
 
                /// <exception cref="NGit.Errors.UnmergedPathException"></exception>
161
 
                /// <exception cref="NGit.Api.Errors.NoHeadException"></exception>
162
 
                /// <exception cref="NGit.Api.Errors.ConcurrentRefUpdateException"></exception>
163
 
                /// <exception cref="NGit.Api.Errors.JGitInternalException"></exception>
164
 
                /// <exception cref="NGit.Api.Errors.WrongRepositoryStateException"></exception>
 
153
                /// <exception cref="NGit.Api.Errors.GitAPIException"></exception>
165
154
                [NUnit.Framework.Test]
166
155
                public virtual void TestWrongParams()
167
156
                {
179
168
                // expected
180
169
                // try to work with Commands after command has been invoked. Should throw
181
170
                // exceptions
182
 
                /// <exception cref="NGit.Api.Errors.NoHeadException"></exception>
183
 
                /// <exception cref="NGit.Api.Errors.ConcurrentRefUpdateException"></exception>
184
 
                /// <exception cref="NGit.Api.Errors.NoMessageException"></exception>
185
 
                /// <exception cref="NGit.Errors.UnmergedPathException"></exception>
186
 
                /// <exception cref="NGit.Api.Errors.JGitInternalException"></exception>
187
 
                /// <exception cref="NGit.Api.Errors.WrongRepositoryStateException"></exception>
 
171
                /// <exception cref="NGit.Api.Errors.GitAPIException"></exception>
188
172
                [NUnit.Framework.Test]
189
173
                public virtual void TestMultipleInvocations()
190
174
                {
216
200
 
217
201
                // expected
218
202
                /// <exception cref="System.IO.IOException"></exception>
219
 
                /// <exception cref="NGit.Api.Errors.NoHeadException"></exception>
220
 
                /// <exception cref="NGit.Api.Errors.NoMessageException"></exception>
221
 
                /// <exception cref="NGit.Api.Errors.ConcurrentRefUpdateException"></exception>
222
203
                /// <exception cref="NGit.Api.Errors.JGitInternalException"></exception>
223
 
                /// <exception cref="NGit.Api.Errors.WrongRepositoryStateException"></exception>
 
204
                /// <exception cref="NGit.Api.Errors.GitAPIException"></exception>
224
205
                [NUnit.Framework.Test]
225
206
                public virtual void TestMergeEmptyBranches()
226
207
                {
 
208
                        if (!FS.DETECTED.SupportsExecute())
 
209
                                return;
 
210
 
227
211
                        Git git = new Git(db);
228
212
                        git.Commit().SetMessage("initial commit").Call();
229
213
                        RefUpdate r = db.UpdateRef("refs/heads/side");
241
225
                        RevCommit[] parents = commit.Parents;
242
226
                        NUnit.Framework.Assert.AreEqual(parents[0], firstSide);
243
227
                        NUnit.Framework.Assert.AreEqual(parents[1], second);
244
 
                        NUnit.Framework.Assert.IsTrue(parents.Length == 2);
 
228
                        NUnit.Framework.Assert.AreEqual(2, parents.Length);
245
229
                }
246
230
 
247
231
                /// <exception cref="System.IO.IOException"></exception>
248
 
                /// <exception cref="NGit.Api.Errors.NoHeadException"></exception>
249
 
                /// <exception cref="NGit.Api.Errors.NoMessageException"></exception>
250
 
                /// <exception cref="NGit.Api.Errors.ConcurrentRefUpdateException"></exception>
251
232
                /// <exception cref="NGit.Api.Errors.JGitInternalException"></exception>
252
 
                /// <exception cref="NGit.Api.Errors.WrongRepositoryStateException"></exception>
253
 
                /// <exception cref="NGit.Api.Errors.NoFilepatternException"></exception>
 
233
                /// <exception cref="NGit.Api.Errors.GitAPIException"></exception>
254
234
                [NUnit.Framework.Test]
255
235
                public virtual void TestAddUnstagedChanges()
256
236
                {
279
259
                }
280
260
 
281
261
                /// <exception cref="System.IO.IOException"></exception>
282
 
                /// <exception cref="NGit.Api.Errors.NoFilepatternException"></exception>
283
 
                /// <exception cref="NGit.Api.Errors.NoHeadException"></exception>
284
 
                /// <exception cref="NGit.Api.Errors.NoMessageException"></exception>
285
 
                /// <exception cref="NGit.Api.Errors.ConcurrentRefUpdateException"></exception>
286
 
                /// <exception cref="NGit.Api.Errors.JGitInternalException"></exception>
287
 
                /// <exception cref="NGit.Api.Errors.WrongRepositoryStateException"></exception>
 
262
                /// <exception cref="NGit.Api.Errors.GitAPIException"></exception>
288
263
                [NUnit.Framework.Test]
289
264
                public virtual void TestModeChange()
290
265
                {
 
266
                        if (Runtime.GetProperty("os.name").StartsWith("Windows"))
 
267
                        {
 
268
                                return;
 
269
                        }
 
270
                        // SKIP
291
271
                        Git git = new Git(db);
292
272
                        // create file
293
273
                        FilePath file = new FilePath(db.WorkTree, "a.txt");
310
290
                                ();
311
291
                }
312
292
 
313
 
                /// <exception cref="NGit.Api.Errors.NoHeadException"></exception>
314
 
                /// <exception cref="NGit.Api.Errors.NoMessageException"></exception>
315
 
                /// <exception cref="NGit.Errors.UnmergedPathException"></exception>
316
 
                /// <exception cref="NGit.Api.Errors.ConcurrentRefUpdateException"></exception>
 
293
                /// <exception cref="NGit.Api.Errors.GitAPIException"></exception>
317
294
                /// <exception cref="NGit.Api.Errors.JGitInternalException"></exception>
318
 
                /// <exception cref="NGit.Api.Errors.WrongRepositoryStateException"></exception>
 
295
                /// <exception cref="NGit.Errors.MissingObjectException"></exception>
319
296
                /// <exception cref="NGit.Errors.IncorrectObjectTypeException"></exception>
320
 
                /// <exception cref="NGit.Errors.MissingObjectException"></exception>
321
297
                [NUnit.Framework.Test]
322
298
                public virtual void TestCommitRange()
323
299
                {
349
325
                        NUnit.Framework.Assert.AreEqual(l, -1);
350
326
                }
351
327
 
352
 
                /// <exception cref="NGit.Api.Errors.NoHeadException"></exception>
353
 
                /// <exception cref="NGit.Api.Errors.NoMessageException"></exception>
354
 
                /// <exception cref="NGit.Api.Errors.ConcurrentRefUpdateException"></exception>
355
328
                /// <exception cref="NGit.Api.Errors.JGitInternalException"></exception>
356
 
                /// <exception cref="NGit.Api.Errors.WrongRepositoryStateException"></exception>
357
329
                /// <exception cref="System.IO.IOException"></exception>
 
330
                /// <exception cref="NGit.Api.Errors.GitAPIException"></exception>
358
331
                [NUnit.Framework.Test]
359
332
                public virtual void TestCommitAmend()
360
333
                {
378
351
                                ));
379
352
                }
380
353
 
381
 
                /// <exception cref="NGit.Api.Errors.NoHeadException"></exception>
382
 
                /// <exception cref="NGit.Api.Errors.NoMessageException"></exception>
383
 
                /// <exception cref="NGit.Errors.UnmergedPathException"></exception>
384
 
                /// <exception cref="NGit.Api.Errors.ConcurrentRefUpdateException"></exception>
385
354
                /// <exception cref="NGit.Api.Errors.JGitInternalException"></exception>
386
 
                /// <exception cref="NGit.Api.Errors.WrongRepositoryStateException"></exception>
 
355
                /// <exception cref="NGit.Api.Errors.GitAPIException"></exception>
387
356
                [NUnit.Framework.Test]
388
357
                public virtual void TestInsertChangeId()
389
358
                {