Keep() public method

Keeps the entire flash contents available for the next action
public Keep ( ) : void
return void
Ejemplo n.º 1
0
		public void FlashKeep()
		{
			Flash flash = new Flash();

			flash.Now("test1","hello");
			flash.Now("test2","hello");

			flash.Keep("test1");

			flash.Sweep();

			Assert.IsTrue( flash.ContainsKey("test1") );
			Assert.IsFalse( flash.ContainsKey("test2") );

			flash = new Flash(flash);
			flash.Sweep();

			Assert.IsTrue( flash.Count == 0 );

			flash.Now("test1","hello");
			flash.Now("test2","hello");

			flash.Keep();

			flash.Sweep();

			Assert.IsTrue( flash.ContainsKey("test1") );
			Assert.IsTrue( flash.ContainsKey("test2") );
		}