Ejemplo n.º 1
0
 public void ContinueIsWindowing()
 {
     StubSQSService service = new StubSQSService();
     service.Start();
     service.Pause();
     service.Continue();
     Assert.IsTrue(service.IsWindowing);
 }
Ejemplo n.º 2
0
 public void StopIsWindowing()
 {
     StubSQSService service = new StubSQSService();
     service.Start();
     service.Stop();
     Assert.IsFalse(service.IsWindowing);
 }
Ejemplo n.º 3
0
 public void StartIsWindowing()
 {
     StubSQSService service = new StubSQSService();
     service.Start();
     Assert.IsTrue(service.IsWindowing);
 }
Ejemplo n.º 4
0
 public void PowerEventSuspendIsWindowing()
 {
     StubSQSService service = new StubSQSService();
     service.Start();
     service.PowerEvent(PowerBroadcastStatus.Suspend);
     Assert.IsFalse(service.IsWindowing);
 }
Ejemplo n.º 5
0
 public void PowerEventBatteryLowIsWindowing()
 {
     StubSQSService service = new StubSQSService();
     service.Start();
     service.PowerEvent(PowerBroadcastStatus.BatteryLow);
     Assert.IsFalse(service.IsWindowing);
 }
Ejemplo n.º 6
0
        public void NoQueueUrlConfiguredThrows()
        {
            String value = ConfigurationManager.AppSettings["QueueUrl"];
            RemoveConfigValue("QueueUrl");

            StubSQSService service = new StubSQSService();
            try
            {

                service.Start();
                Assert.Fail();
            }
            catch (ConfigurationErrorsException) { }

            AddConfigValue("QueueUrl", value);
        }
Ejemplo n.º 7
0
        public void NoAWSSecretAccessKeyThrows()
        {
            String value = ConfigurationManager.AppSettings["AWSSecretAccessKey"];
            RemoveConfigValue("AWSSecretAccessKey");

            StubSQSService service = new StubSQSService();
            try
            {
                service.Start();
                Assert.Fail();
            }
            catch (ConfigurationErrorsException) { }

            AddConfigValue("AWSSecretAccessKey", value);
        }