Longest time to first test pass, but it now works

time to read 1 min | 76 words

public class DivanDatabaseTest
{
	[Fact]
	public void Can_add_document_to_database()
	{
		using (var instance = new Instance("test"))
		{
			instance.Init();

			using (var sesion = new Session(instance.JetInstance))
			{
				var database = new DivanDatabase(instance, sesion, "test.divan");
				DocumentId[] add = database.Add(
					JObject.Parse("{'name': 'oren', 'email': 'ayende@ayende.com'")
					);

				using (var view = database.OpenDocumentsView())
				{
					var doc = view.FindById(add[0].Id);

					Assert.Equal("oren", (string) doc["name"]);
					Assert.Equal("ayende@ayende.com", (string) doc["email"]);
				}
			}
		}
	}
}