public void Setup() { secrets = Secrets.LoadFromFile("aws.secrets"); var config = new SimolConfig { AutoCreateDomains = true, Cache = null, ReadConsistency = ConsistencyBehavior.Immediate }; simolClient = new SimolClient(secrets.AwsAccessKeyId, secrets.AwsSecretAccessKey, config); }
public MailStore(Secrets secrets) { ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, chain, errors) => true; var config = new SimolConfig { AutoCreateDomains = true, Cache = null, ReadConsistency = ConsistencyBehavior.Immediate }; simolClient = new SimolClient(secrets.Username, secrets.Password, config); }
public void Stale_Data_is_detected() { var person1 = new StaleSafePerson { Name = "Stefan" }; simolClient.Put(person1); var simolClient2 = new SimolClient(secrets.AwsAccessKeyId, secrets.AwsSecretAccessKey); var person2 = simolClient2.Get<StaleSafePerson>(person1.Id); Assert.That(person1, Is.Not.SameAs(person2)); Assert.That(person2.Id, Is.EqualTo(person1.Id)); Assert.That(person2.Name, Is.EqualTo(person1.Name)); person1.Name = "Paul"; simolClient.Put(person1); person2.Name = "Jakob"; simolClient2.Put(person2); // Throws }
public void Setup() { secrets = Secrets.LoadFromFile("aws.secrets"); simolClient = new SimolClient(secrets.AwsAccessKeyId, secrets.AwsSecretAccessKey); }