Esempio n. 1
0
		public void TestDisposedFilename()
		{
			HttpFile file = new HttpFile("object", "object", "object");
			file.Dispose();

			#pragma warning disable 168
		    Assert.Throws(typeof (ObjectDisposedException), delegate { string tmp = file.Filename; });
			#pragma warning restore 168
		}
Esempio n. 2
0
        /// <summary> Test to make sure files gets deleted upon disposing </summary>
        public void TestFileDeletion()
        {
            string   path = Environment.CurrentDirectory + "\\tmptest";
            HttpFile file = new HttpFile("testFile", path, "nun");

            File.WriteAllText(path, "test");
            file.Dispose();

            Assert.Equal(File.Exists(path), false);
        }
Esempio n. 3
0
		/// <summary> Test to make sure files gets deleted upon disposing </summary>
		public void TestFileDeletion()
		{
			string path = Environment.CurrentDirectory + "\\tmptest";
			HttpFile file = new HttpFile("testFile", path, "nun");

			File.WriteAllText(path, "test");
			file.Dispose();

			Assert.Equal(File.Exists(path), false);
		}
Esempio n. 4
0
        public void TestDisposedFilename()
        {
            HttpFile file = new HttpFile("object", "object", "object");

            file.Dispose();

                        #pragma warning disable 168
            Assert.Throws(typeof(ObjectDisposedException), delegate { string tmp = file.Filename; });
                        #pragma warning restore 168
        }