Example #1
0
        public void GetProjects_MissingSettings_ThrowsException()
        {
            PavilotSettings settings = null;
            var             service  = new PavilotService(settings);

            Assert.ThrowsAsync <ArgumentNullException>(() => service.GetProjectsAsync());
        }
Example #2
0
        public void PavilotService_InValid_MissingApiKey_ThrowsArgumentNullException()
        {
            var settings = new PavilotSettings
            {
                ApiEndpoint = "http://v1.pavilot.com"
            };

            var service = new PavilotService(settings);

            Assert.Throws <ArgumentNullException>(() => service.IsValid());
        }
Example #3
0
        public void PavilotService_InValid_MissingApiEndpoint_ThrowsArgumentNullException()
        {
            var settings = new PavilotSettings
            {
                ApiKey = "PavilotSubscriptionKey"
            };

            var service = new PavilotService(settings);

            Assert.Throws <ArgumentNullException>(() => service.IsValid());
        }
Example #4
0
        public void PavilotService_Valid_Settings()
        {
            var settings = new PavilotSettings
            {
                ApiEndpoint = "http://v1.pavilot.com",
                ApiKey      = "PavilotSubscriptionKey"
            };

            var service = new PavilotService(settings);

            Assert.True(service.IsValid());
        }