Пример #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);
        }