<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using Twitterizer;
using System.Net;

namespace Twitterizer2.TestCases
{
    [TestFixture]
    public class OAuthTests
    {
        [Test]
        public static void RequestToken()
        {
            OAuthTokens tokens = Configuration.GetTokens();

            //OAuthTokenResponse response = OAuthUtility.GetRequestToken(tokens.ConsumerKey, tokens.ConsumerSecret, "oob");

            //Assert.IsNotNull(response);
            //Assert.IsNotNullOrEmpty(response.Token);
        }

        [Test]
        public static void UrlInStatus()
        {
            OAuthTokens tokens = Configuration.GetTokens();

            TwitterResponse<TwitterStatus> result = TwitterStatus.Update(tokens, "I am testing. Please ignore this. protocol://host/page?key=value&key2=value2" + new Random().Next(1000).ToString());
            Assert.IsNotNull(result.ResponseObject);
            Assert.That(result.ResponseObject.Id > 0);
        }

        [Test]
        public static void WebRequestBuilderParts()
        {
            WebRequestBuilder builder = new WebRequestBuilder(new Uri("http://example.com/endpoint"), HTTPVerb.GET)
                                            {
                                                Tokens = new OAuthTokens()
                                                             {
                                                                 ConsumerSecret = "<KEY>",
                                                                 AccessTokenSecret = "A6FE4462BAA8C3ADEA7D9E3BCD5BB"
                                                             }
                                            };

            // Manually add our values
            builder.Parameters.Add("oauth_version", "1.0");<commit_msg>I always forget the tests.<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using Twitterizer;
using System.Net;

namespace Twitterizer2.TestCases
{
    [TestFixture]
    public class OAuthTests
    {
        [Test]
        public static void RequestToken()
        {
            OAuthTokens tokens = Configuration.GetTokens();

            //OAuthTokenResponse response = OAuthUtility.GetRequestToken(tokens.ConsumerKey, tokens.ConsumerSecret, "oob");

            //Assert.IsNotNull(response);
            //Assert.IsNotNullOrEmpty(response.Token);
        }

        [Test]
        public static void UrlInStatus()
        {
            OAuthTokens tokens = Configuration.GetTokens();

            TwitterResponse<TwitterStatus> result = TwitterStatus.Update(tokens, "I am testing. Please ignore this. protocol://host/page?key=value&key2=value2" + new Random().Next(1000).ToString());
            Assert.IsNotNull(result.ResponseObject);
            Assert.That(result.ResponseObject.Id > 0);
        }

        [Test]
        public static void WebRequestBuilderParts()
        {
            WebRequestBuilder builder = new WebRequestBuilder(
                new Uri("http://example.com/endpoint"),
                HTTPVerb.GET,
                new OAuthTokens()
                                {
                                    ConsumerSecret = "<KEY>",
                                    AccessTokenSecret = "A6FE4462BAA8C3ADEA7D9E3BCD5BB"
                                }
            );

            // Manually add our values
            builder.Parameters.Add("oauth_version", "1.0");
{'fraction_non_alphanumeric': 0.09024045261669024, 'fraction_numerical': 0.011881188118811881, 'mean_word_length': 1.6, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3294006', 'n_tokens_mistral': 857, 'n_tokens_neox': 835, 'n_words': 167}