コード例 #1
0
 public virtual void TestTimeout_close_Success()
 {
     bool[] called = new bool[1];
     os = new TimeoutOutputStream(new _OutputStream_206(called), timer);
     os.SetTimeout(timeout);
     os.Close();
     NUnit.Framework.Assert.IsTrue(called[0]);
 }
コード例 #2
0
 public virtual void TestTimeout_close_Timeout()
 {
     bool[] called = new bool[1];
     os = new TimeoutOutputStream(new _OutputStream_225(called), timer);
     os.SetTimeout(timeout);
     BeginWrite();
     try
     {
         os.Close();
         NUnit.Framework.Assert.Fail("incorrectly closed");
     }
     catch (ThreadInterruptedException)
     {
     }
     // expected
     AssertTimeout();
     NUnit.Framework.Assert.IsTrue(called[0]);
 }
コード例 #3
0
ファイル: TimeoutOutputStreamTest.cs プロジェクト: shoff/ngit
		public virtual void TestTimeout_close_Timeout()
		{
			bool[] called = new bool[1];
			os = new TimeoutOutputStream(new _OutputStream_224(called), timer);
			os.SetTimeout(timeout);
			BeginWrite();
			try
			{
				os.Close();
				NUnit.Framework.Assert.Fail("incorrectly closed");
			}
			catch (ThreadInterruptedException)
			{
			}
			// expected
			AssertTimeout();
			NUnit.Framework.Assert.IsTrue(called[0]);
		}
コード例 #4
0
ファイル: TimeoutOutputStreamTest.cs プロジェクト: shoff/ngit
		public virtual void TestTimeout_close_Success()
		{
			bool[] called = new bool[1];
			os = new TimeoutOutputStream(new _OutputStream_205(called), timer);
			os.SetTimeout(timeout);
			os.Close();
			NUnit.Framework.Assert.IsTrue(called[0]);
		}