Ejemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void testLeaveFilesIfTestFails()
        public virtual void TestLeaveFilesIfTestFails()
        {
            Result r = JUnitCore.runClasses(typeof(Nested1));

            Assert.AreEqual(1, r.FailureCount);
            Assert.IsTrue(Nested1.File != null && Nested1.File.Exists());
            Nested1.File.delete();
        }
Ejemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void testWindowsUnremovableFile() throws java.io.IOException
        public virtual void TestWindowsUnremovableFile()
        {
            RandomizedTest.assumeTrue("Requires Windows.", Constants.WINDOWS);
            RandomizedTest.assumeFalse(LuceneTestCase.LEAVE_TEMPORARY);

            Result r = JUnitCore.runClasses(typeof(Nested2));

            Assert.AreEqual(1, r.FailureCount);

            Nested2.OpenFile.Dispose();
            TestUtil.rm(Nested2.Parent);
        }