Exemplo n.º 1
0
 public void SetUp()
 {
     _configuration = MockRepository.GenerateMock <IAntiCsrfConfiguration>();
     _configuration.Stub(arg => arg.MemoryCacheName).Return("cache");
     _repository = new MemoryCacheRepository(_configuration);
     _sessionId  = Guid.Parse("710f7634-b013-4fb8-abf5-97c98e4993c3");
     _nonce      = Guid.Parse("0dd344d0-7115-4c0e-864a-afaecb339138");
     _repository.AddAsync(_sessionId, _nonce, DateTime.UtcNow, DateTime.MaxValue.ToUniversalTime());
 }
Exemplo n.º 2
0
 public async void Must_require_utc_created_timestamp()
 {
     await _repository.AddAsync(Guid.NewGuid(), Guid.NewGuid(), DateTime.Now, DateTime.UtcNow);
 }