예제 #1
0
      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 );
      }
예제 #2
0
        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);
        }