Esempio n. 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 );
      }
Esempio n. 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);
        }