<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using Renci.SshNet.Channels;
using Renci.SshNet.Common;
using Renci.SshNet.Sftp;

namespace Renci.SshNet.Tests.Classes.Sftp
{
    [TestClass]
    public class SftpSessionTest_Connected_RequestRead
    {
        private Mock<ISession> _sessionMock;
        private Mock<IServiceFactory> _serviceFactoryMock;
        private Mock<IChannelSession> _channelSessionMock;
        private SftpSession _sftpSession;
        private TimeSpan _operationTimeout;
        private byte[] _actual;
        private byte[] _expected;
        private Encoding _encoding;

        [TestInitialize]
        public void Setup()
        {
            Arrange();
            Act();
        }

        protected void Arrange()
        {
            var random = new Random();

            _operationTimeout = TimeSpan.FromMilliseconds(random.Next(100, 500));
            _expected = new byte[random.Next(30, 50)];
            _encoding = Encoding.UTF8;
            random.NextBytes(_expected);

            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
            _channelSessionMock = new Mock<IChannelSession>(MockBehavior.Strict);

            var sequence = new MockSequence();<commit_msg>Fix test.<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using Renci.SshNet.Channels;
using Renci.SshNet.Common;
using Renci.SshNet.Sftp;

namespace Renci.SshNet.Tests.Classes.Sftp
{
    [TestClass]
    public class SftpSessionTest_Connected_RequestRead
    {
        private Mock<ISession> _sessionMock;
        private Mock<IServiceFactory> _serviceFactoryMock;
        private Mock<IChannelSession> _channelSessionMock;
        private SftpSession _sftpSession;
        private TimeSpan _operationTimeout;
        private byte[] _actual;
        private byte[] _expected;
        private Encoding _encoding;

        [TestInitialize]
        public void Setup()
        {
            Arrange();
            Act();
        }

        protected void Arrange()
        {
            var random = new Random();

            _operationTimeout = TimeSpan.FromMilliseconds(random.Next(100, 500));
            _expected = new byte[random.Next(30, 50)];
            _encoding = Encoding.UTF8;
            random.NextBytes(_expected);

            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
            _channelSessionMock = new Mock<IChannelSession>(MockBehavior.Strict);
            _serviceFactoryMock = new Mock<IServiceFactory>(MockBehavior.Strict);

            var sequence = new MockSequence();
{'fraction_non_alphanumeric': 0.08447653429602887, 'fraction_numerical': 0.007942238267148015, 'mean_word_length': 2.684840425531915, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, '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': '6818896', 'n_tokens_mistral': 780, 'n_tokens_neox': 751, 'n_words': 165}