Delete() public method

public Delete ( Entry entry ) : void
entry Entry
return void
		public void OnDisposeWillCompact()
		{
			var memoryStream = new MemoryStream();
			var phoneBook = new PersistentPhoneBook(memoryStream, streamOwner:false);

			for (int i = 0; i < 5; i++)
			{
				var expected = new Entry
				{
					FirstName = "ayende",
					LastName = "rahien",
					Number = "01231412312312",
					Type = "Home"
				};
				phoneBook.Create(expected);
			}

			var before = memoryStream.Length;

			var entry = phoneBook.ReadEntries()
				.Skip(2).First();
			phoneBook.Delete(entry);

			Assert.Equal(before, memoryStream.Length); // shouldn't change

			phoneBook.Dispose();

			Assert.True(before > memoryStream.Length);

		}
		public void CanDeleteEntry()
		{
			var phoneBook = new PersistentPhoneBook(new MemoryStream());

			for (int i = 0; i < 5; i++)
			{
				var expected = new Entry
				{
					FirstName = "ayende",
					LastName = "rahien",
					Number = "01231412312312",
					Type = "Home"
				};
				phoneBook.Create(expected);
			}

			var entry = phoneBook.ReadEntries()
				.Skip(2).First();
			phoneBook.Delete(entry);

			Assert.Equal(4, phoneBook.ReadEntries().Count());
		}