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

« back to all changes in this revision

Viewing changes to external/ngit/NGit.Test/NGit.Util.IO/TimeoutOutputStreamTest.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:
110
110
                        os.Write(exp[2]);
111
111
                        @in.Want(exp.Length);
112
112
                        @in.Read(act);
113
 
                        NUnit.Framework.Assert.IsTrue(Arrays.Equals(exp, act));
 
113
                         CollectionAssert.AreEquivalent(exp, act);
114
114
                }
115
115
 
116
116
                /// <exception cref="System.IO.IOException"></exception>
140
140
                        os.Write(exp);
141
141
                        @in.Want(exp.Length);
142
142
                        @in.Read(act);
143
 
                        NUnit.Framework.Assert.IsTrue(Arrays.Equals(exp, act));
 
143
                         CollectionAssert.AreEquivalent(exp, act);
144
144
                }
145
145
 
146
146
                /// <exception cref="System.IO.IOException"></exception>
165
165
                public virtual void TestTimeout_flush_Success()
166
166
                {
167
167
                        bool[] called = new bool[1];
168
 
                        os = new TimeoutOutputStream(new _OutputStream_152(called), timer);
 
168
                        os = new TimeoutOutputStream(new _OutputStream_153(called), timer);
169
169
                        os.SetTimeout(timeout);
170
170
                        os.Flush();
171
171
                        NUnit.Framework.Assert.IsTrue(called[0]);
172
172
                }
173
173
 
174
 
                private sealed class _OutputStream_152 : OutputStream
 
174
                private sealed class _OutputStream_153 : OutputStream
175
175
                {
176
 
                        public _OutputStream_152(bool[] called)
 
176
                        public _OutputStream_153(bool[] called)
177
177
                        {
178
178
                                this.called = called;
179
179
                        }
198
198
                public virtual void TestTimeout_flush_Timeout()
199
199
                {
200
200
                        bool[] called = new bool[1];
201
 
                        os = new TimeoutOutputStream(new _OutputStream_171(called), timer);
 
201
                        os = new TimeoutOutputStream(new _OutputStream_172(called), timer);
202
202
                        os.SetTimeout(timeout);
203
203
                        BeginWrite();
204
204
                        try
214
214
                        NUnit.Framework.Assert.IsTrue(called[0]);
215
215
                }
216
216
 
217
 
                private sealed class _OutputStream_171 : OutputStream
 
217
                private sealed class _OutputStream_172 : OutputStream
218
218
                {
219
 
                        public _OutputStream_171(bool[] called)
 
219
                        public _OutputStream_172(bool[] called)
220
220
                        {
221
221
                                this.called = called;
222
222
                        }
252
252
                public virtual void TestTimeout_close_Success()
253
253
                {
254
254
                        bool[] called = new bool[1];
255
 
                        os = new TimeoutOutputStream(new _OutputStream_205(called), timer);
 
255
                        os = new TimeoutOutputStream(new _OutputStream_206(called), timer);
256
256
                        os.SetTimeout(timeout);
257
257
                        os.Close();
258
258
                        NUnit.Framework.Assert.IsTrue(called[0]);
259
259
                }
260
260
 
261
 
                private sealed class _OutputStream_205 : OutputStream
 
261
                private sealed class _OutputStream_206 : OutputStream
262
262
                {
263
 
                        public _OutputStream_205(bool[] called)
 
263
                        public _OutputStream_206(bool[] called)
264
264
                        {
265
265
                                this.called = called;
266
266
                        }
285
285
                public virtual void TestTimeout_close_Timeout()
286
286
                {
287
287
                        bool[] called = new bool[1];
288
 
                        os = new TimeoutOutputStream(new _OutputStream_224(called), timer);
 
288
                        os = new TimeoutOutputStream(new _OutputStream_225(called), timer);
289
289
                        os.SetTimeout(timeout);
290
290
                        BeginWrite();
291
291
                        try
301
301
                        NUnit.Framework.Assert.IsTrue(called[0]);
302
302
                }
303
303
 
304
 
                private sealed class _OutputStream_224 : OutputStream
 
304
                private sealed class _OutputStream_225 : OutputStream
305
305
                {
306
 
                        public _OutputStream_224(bool[] called)
 
306
                        public _OutputStream_225(bool[] called)
307
307
                        {
308
308
                                this.called = called;
309
309
                        }