示例#1
0
        public void TestProviderPersistance()
        {
            List <IMetadataProvider> providers = new List <IMetadataProvider>();
            var provider = new TestProvider();

            provider.date = DateTime.Now;
            providers.Add(provider);
            Guid guid = Guid.Empty;

            Kernel.Instance.ItemRepository.SaveProviders(guid, providers);
            providers = Kernel.Instance.ItemRepository.RetrieveProviders(guid).ToList();
            Assert.AreEqual(provider.date, (providers[0] as TestProvider).date);
        }
 public void TestProviderPersistance()
 {
     List<IMetadataProvider> providers = new List<IMetadataProvider>();
     var provider = new TestProvider();
     provider.date = DateTime.Now;
     providers.Add(provider);
     Guid guid = Guid.Empty;
     Kernel.Instance.ItemRepository.SaveProviders(guid, providers);
     providers = Kernel.Instance.ItemRepository.RetrieveProviders(guid).ToList();
     Assert.AreEqual(provider.date, (providers[0] as TestProvider).date);
 }