public LastResultFor ( string id ) : |
||
id | string | |
return |
public SpecRecord(Specification data, ResultsCache cache) { this.data = data; LastResults = cache.LastResultFor(data.id); }
public SpecRecord(Specification data, ResultsCache cache) { this.data = data; LastResults = cache.LastResultFor(data.id); }
// The time comparison is off from using DateTime.UtcNow [Fact] public void last_counts() { var c = new ResultsCache(); var result1 = new SpecExecutionCompleted("foo", new SpecResults(), new Specification()); c.Store(result1); var result2 = new SpecExecutionCompleted("bar", new SpecResults(), new Specification()); c.Store(result2); var result3 = new SpecExecutionCompleted("foo", new SpecResults{Counts = new Counts()}, new Specification()); c.Store(result3); c.LastResultFor("foo") .ShouldBe(result3); }