public async Task Retreive_WithNonExistantKey_ReturnsNull() { var store = new InMemoryJobStore(loggerMock.Object); var job = await store.GetById(365); job.Should().BeNull(); }
public async Task Retreive_WithExistingKey_RetrievesAtSavedKey() { var store = new InMemoryJobStore(loggerMock.Object); var id = IDGenerator.GenerateNewId(); await store.Save(id, sortingJob); var job = await store.GetById(id); job.Should().NotBeNull(); job.Should().BeOfType(typeof(SortingJob)); job.Should().BeSameAs(sortingJob); }