Exemplo n.º 1
0
 public IEnumerable <Notification> GetNotificationsAfter(DateTime inclusiveStartTime)
 {
     using (var myAdapter = _persistenceLayer.GetDataAccessAdapter())
     {
         var linqMetaData = new LinqMetaData(myAdapter);
         return(_notificationMapper.MapMultiple(NotificationEntities(linqMetaData).Where(n => n.DateCreated >= inclusiveStartTime)).ToList());
     }
 }
Exemplo n.º 2
0
        public void GetConfigurationValueReturnsEpochDateWhenEpochNameSettingGiven()
        {
            Expect.Call(_persistenceLayer.GetDataAccessAdapter()).Return(_dataAccessAdapter);
            Expect.Call(() => _dataAccessAdapter.FetchEntityCollection(null, null)).IgnoreArguments().
            Callback(new FetchEntityCollectionDelegate(FetchEntityCollection));
            Expect.Call(_dataAccessAdapter.Dispose);

            _mocks.ReplayAll();
            string epochDateString = _repository.GetConfigurationValue(ConfigurationSettingName.EpochDate);

            _mocks.VerifyAll();

            var epochDate = DateTime.Parse(epochDateString);

            Assert.AreEqual(DateTime.Parse(_expectedDateString), epochDate);
        }
Exemplo n.º 3
0
 protected void ExpectGetDataAccessAdapterAndDispose(int numberOfTimesToExpect)
 {
     Expect.Call(_persistenceLayer.GetDataAccessAdapter()).Return(_dataAccessAdapter).Repeat.Times(numberOfTimesToExpect);
     Expect.Call(_dataAccessAdapter.Dispose).Repeat.Times(numberOfTimesToExpect);
 }