<commit_before>﻿using System;
using System.IO;
using System.Net.Http;
using System.Threading.Tasks;
using Xunit;
using TinyPng.ResizeOperations;

namespace TinyPng.Tests
{
    public class TinyPngTests
    {
        const string apiKey = "<KEY>";

        internal const string Cat = "Resources/cat.jpg";
        internal const string CompressedCat = "Resources/compressedcat.jpg";
        internal const string ResizedCat = "Resources/resizedcat.jpg";
        internal const string SavedCatPath = "Resources/savedcat.jpg";

        [Fact]
        public void TinyPngClientThrowsWhenNoApiKeySupplied()
        {
            Assert.Throws<ArgumentNullException>(() => new TinyPngClient(null));
        }

        [Fact]
        public void TinyPngClientThrowsWhenNoValidS3ConfigurationSupplied()
        {
            Assert.Throws<ArgumentNullException>(() => new TinyPngClient(null));
            Assert.Throws<ArgumentNullException>(() => new TinyPngClient(null, null));
            Assert.Throws<ArgumentNullException>(() => new TinyPngClient("apiKey", null));
            Assert.Throws<ArgumentNullException>(() => new TinyPngClient(null, new AmazonS3Configuration("a", "b", "c", "d")));<commit_msg>remove api key, have killed that key anyway<commit_after>﻿using System;
using System.IO;
using System.Net.Http;
using System.Threading.Tasks;
using Xunit;
using TinyPng.ResizeOperations;

namespace TinyPng.Tests
{
    public class TinyPngTests
    {
        const string apiKey = "lolwat";

        internal const string Cat = "Resources/cat.jpg";
        internal const string CompressedCat = "Resources/compressedcat.jpg";
        internal const string ResizedCat = "Resources/resizedcat.jpg";
        internal const string SavedCatPath = "Resources/savedcat.jpg";

        [Fact]
        public void TinyPngClientThrowsWhenNoApiKeySupplied()
        {
            Assert.Throws<ArgumentNullException>(() => new TinyPngClient(null));
        }

        [Fact]
        public void TinyPngClientThrowsWhenNoValidS3ConfigurationSupplied()
        {
            Assert.Throws<ArgumentNullException>(() => new TinyPngClient(null));
            Assert.Throws<ArgumentNullException>(() => new TinyPngClient(null, null));
            Assert.Throws<ArgumentNullException>(() => new TinyPngClient("apiKey", null));
            Assert.Throws<ArgumentNullException>(() => new TinyPngClient(null, new AmazonS3Configuration("a", "b", "c", "d")));
{'fraction_non_alphanumeric': 0.11284366023799754, 'fraction_numerical': 0.0016413623307345096, 'mean_word_length': 3.4007220216606497, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 24, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2746595', 'n_tokens_mistral': 696, 'n_tokens_neox': 676, 'n_words': 148}