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

« back to all changes in this revision

Viewing changes to external/ngit/NGit.Test/NGit.Api/CleanCommandTest.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:
70
70
                }
71
71
 
72
72
                /// <exception cref="NGit.Errors.NoWorkTreeException"></exception>
73
 
                /// <exception cref="System.IO.IOException"></exception>
 
73
                /// <exception cref="NGit.Api.Errors.GitAPIException"></exception>
74
74
                [NUnit.Framework.Test]
75
75
                public virtual void TestClean()
76
76
                {
83
83
                        ICollection<string> cleanedFiles = git.Clean().Call();
84
84
                        status = git.Status().Call();
85
85
                        files = status.GetUntracked();
86
 
                        NUnit.Framework.Assert.IsTrue(files.Count == 0);
 
86
                        NUnit.Framework.Assert.AreEqual(0, files.Count);
87
87
                        NUnit.Framework.Assert.IsTrue(cleanedFiles.Contains("File2.txt"));
88
88
                        NUnit.Framework.Assert.IsTrue(cleanedFiles.Contains("File3.txt"));
89
89
                }
90
90
 
91
91
                /// <exception cref="NGit.Errors.NoWorkTreeException"></exception>
92
 
                /// <exception cref="System.IO.IOException"></exception>
 
92
                /// <exception cref="NGit.Api.Errors.GitAPIException"></exception>
93
93
                [NUnit.Framework.Test]
94
94
                public virtual void TestCleanWithPaths()
95
95
                {
104
104
                        ICollection<string> cleanedFiles = git.Clean().SetPaths(paths).Call();
105
105
                        status = git.Status().Call();
106
106
                        files = status.GetUntracked();
107
 
                        NUnit.Framework.Assert.IsTrue(files.Count == 1);
 
107
                        NUnit.Framework.Assert.AreEqual(1, files.Count);
108
108
                        NUnit.Framework.Assert.IsTrue(cleanedFiles.Contains("File3.txt"));
109
 
                        NUnit.Framework.Assert.IsTrue(!cleanedFiles.Contains("File2.txt"));
 
109
                        NUnit.Framework.Assert.IsFalse(cleanedFiles.Contains("File2.txt"));
110
110
                }
111
111
 
112
112
                /// <exception cref="NGit.Errors.NoWorkTreeException"></exception>
113
 
                /// <exception cref="System.IO.IOException"></exception>
 
113
                /// <exception cref="NGit.Api.Errors.GitAPIException"></exception>
114
114
                [NUnit.Framework.Test]
115
115
                public virtual void TestCleanWithDryRun()
116
116
                {
123
123
                        ICollection<string> cleanedFiles = git.Clean().SetDryRun(true).Call();
124
124
                        status = git.Status().Call();
125
125
                        files = status.GetUntracked();
126
 
                        NUnit.Framework.Assert.IsTrue(files.Count == 2);
 
126
                        NUnit.Framework.Assert.AreEqual(2, files.Count);
127
127
                        NUnit.Framework.Assert.IsTrue(cleanedFiles.Contains("File2.txt"));
128
128
                        NUnit.Framework.Assert.IsTrue(cleanedFiles.Contains("File3.txt"));
129
129
                }