public void BacklogItem_can_be_Saved() { var backlogItem = new BacklogItemBuilder() .WithId("BacklogItems/1") .ForStory("As a user of ScrumR, I want to see all tasks that I volunteered for") .OwnedBy("Stijn Volders") .EstimatedStoryPoints(6) .InStatus("Not done") .AddingBusinessValue(BusinessValue.XL) .WithEstimatedComplexity(Complexity.XL) .Build(); _session.Store(backlogItem); _session.SaveChanges(); }
public void WaitForStaleResults() { var backlogItem = new BacklogItemBuilder() .WithId("backlogitems/1") .ForStory("As a user of ScrumR, I don't want stale indexes") .OwnedBy("Stijn Volders") .EstimatedStoryPoints(6) .InStatus("Not done") .AddingBusinessValue(BusinessValue.XS) .WithEstimatedComplexity(Complexity.XS) .Build(); _session.Store(backlogItem); _session.SaveChanges(); RavenQueryStatistics stats; var staleIndexBacklogItem = _session.Query<BacklogItem>().Where(bli => bli.Story == "As a user of ScrumR, I don't want stale indexes") .Statistics(out stats) .Customize(x => x.WaitForNonStaleResults(TimeSpan.FromSeconds(5))); Assert.IsNotNull(staleIndexBacklogItem); Debug.WriteLine(stats.IsStale); }