public void Load_StateExists_LoadsStateFromAzureBlob() { var fakeStorageClient = new MockBlobContainerClient().Returning("{ \"foo\": 10 }"); var sut = new CapacityRepository(fakeStorageClient); var state = sut.Load(); Assert.That(state["foo"], Is.EqualTo(10)); }
public void Load_StateDoesNotExist_CreatedAndReturns() { var fakeStorageClient = new MockBlobContainerClient().Returning(null); var sut = new CapacityRepository(fakeStorageClient); var state = sut.Load(); Assert.That(state, Is.Not.Null); Assert.That(state.Count, Is.EqualTo(0)); }