Exemplo n.º 1
0
        public async Task Send_Default_Got_Ok()
        {
            var client = new PushoverClient(ApiKey);

            var message  = client.NewMessage("Hello world");
            var response = await client.SendAsync(message, UserKey);

            Assert.Equal(response.StatusCode, HttpStatusCode.OK);
        }
Exemplo n.º 2
0
        public async Task Send_Default_Got_Ok()
        {
            var client = new PushoverClient(string.Empty);

            PushoverClient.HttpHandler = new MockHandler();

            var message  = client.NewMessage("Hello world");
            var response = await client.SendAsync(message, string.Empty);

            Assert.Equal(response.StatusCode, HttpStatusCode.OK);
        }
Exemplo n.º 3
0
        public async Task Send_Multiple_Got_Ok()
        {
            var client = new PushoverClient(ApiKey);

            var message   = client.NewMessage("Hello world");
            var responses = await client.SendAsync(message, UserKey, UserKey);

            foreach (var response in responses)
            {
                Assert.Equal(response.StatusCode, HttpStatusCode.OK);
            }
        }