public virtual void TestIncorrectBaseSize()
        {
            Init(4, 4);
            Copy(0, 4);
            AssertValidState();
            DeltaStream @in = new _DeltaStream_203(this, new ByteArrayInputStream(delta));

            try
            {
                @in.Read(new byte[4]);
                NUnit.Framework.Assert.Fail("did not throw an exception");
            }
            catch (CorruptObjectException e)
            {
                NUnit.Framework.Assert.AreEqual(JGitText.Get().baseLengthIncorrect, e.Message);
            }
            @in = new _DeltaStream_221(new ByteArrayInputStream(delta));
            try
            {
                @in.Read(new byte[4]);
                NUnit.Framework.Assert.Fail("did not throw an exception");
            }
            catch (CorruptObjectException e)
            {
                NUnit.Framework.Assert.AreEqual(JGitText.Get().baseLengthIncorrect, e.Message);
            }
        }
Пример #2
0
 public virtual void TestIncorrectBaseSize()
 {
     Init(4, 4);
     Copy(0, 4);
     AssertValidState();
     DeltaStream @in = new _DeltaStream_203(this, new ByteArrayInputStream(delta));
     try
     {
         @in.Read(new byte[4]);
         NUnit.Framework.Assert.Fail("did not throw an exception");
     }
     catch (CorruptObjectException e)
     {
         NUnit.Framework.Assert.AreEqual(JGitText.Get().baseLengthIncorrect, e.Message);
     }
     @in = new _DeltaStream_221(new ByteArrayInputStream(delta));
     try
     {
         @in.Read(new byte[4]);
         NUnit.Framework.Assert.Fail("did not throw an exception");
     }
     catch (CorruptObjectException e)
     {
         NUnit.Framework.Assert.AreEqual(JGitText.Get().baseLengthIncorrect, e.Message);
     }
 }