public void GetProjects_MissingSettings_ThrowsException() { PavilotSettings settings = null; var service = new PavilotService(settings); Assert.ThrowsAsync <ArgumentNullException>(() => service.GetProjectsAsync()); }
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()); }
public void PavilotService_InValid_MissingApiEndpoint_ThrowsArgumentNullException() { var settings = new PavilotSettings { ApiKey = "PavilotSubscriptionKey" }; var service = new PavilotService(settings); Assert.Throws <ArgumentNullException>(() => service.IsValid()); }
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()); }