public async Task GetHash_HashToRetrieveIsInRepository_ExpectHashIsReturned() { InMemoryTableStorageProvider.ResetAllTables(); var hashRepository = new HashRepository( new InMemoryTableStorageProvider() ); hashRepository.AddHash( new Hash { Url = "a" } ); await hashRepository.SaveChangesAsync(); var result = await hashRepository.GetHash( "a" ); Assert.AreEqual( "a", result.Url ); }
public async Task GetHash_HashToRetrieveIsInRepository_ExpectHashIsReturned() { InMemoryTableStorageProvider.ResetAllTables(); var hashRepository = new HashRepository(new InMemoryTableStorageProvider()); hashRepository.AddHash(new Hash { Url = "a" }); await hashRepository.SaveChangesAsync(); var result = await hashRepository.GetHash("a"); Assert.AreEqual("a", result.Url); }