<commit_before>package com.github.visgeek.utils.testing;

import java.util.Arrays;
import java.util.Iterator;
import java.util.Objects;

import org.junit.Assert;

import com.github.visgeek.utils.Action0;

public class Assert2 {
	private Assert2() {
	}

	@SafeVarargs
	public static <T> void assertSequanceEquals(Iterable<T> actual, T... expected) {
		Assert2.assertSequanceEquals(null, actual, expected);
	}

	@SafeVarargs
	public static <T> void assertSequanceEquals(String message, Iterable<T> actual, T... expected) {
		Iterator<T> itr = actual.iterator();

		int count = 0;
		while (itr.hasNext()) {
			count++;

			Assert.assertTrue(message, count <= expected.length);

			T item = itr.next();
			Assert.assertTrue(message, Objects.equals(item, expected[count - 1]));<commit_msg>テスト用メソッドを追加した。<commit_after>package com.github.visgeek.utils.testing;

import java.util.Arrays;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Objects;

import org.junit.Assert;

import com.github.visgeek.utils.Action0;

public class Assert2 {
	private Assert2() {
	}

	public static <T> void assertSequanceEquals(Iterable<T> actual, Iterable<T> expected) {
		Assert2.assertSequanceEquals(null, actual, expected);
	}

	@SuppressWarnings("unchecked")
	public static <T> void assertSequanceEquals(String message, Iterable<T> actual, Iterable<T> expected) {
		LinkedList<T> list = new LinkedList<>();
		for (T item : expected) {
			list.add(item);
		}

		Assert2.assertSequanceEquals(message, actual, (T[]) list.toArray());
	}

	@SafeVarargs
	public static <T> void assertSequanceEquals(Iterable<T> actual, T... expected) {
		Assert2.assertSequanceEquals(null, actual, expected);
	}

	@SafeVarargs
	public static <T> void assertSequanceEquals(String message, Iterable<T> actual, T... expected) {
		Iterator<T> itr = actual.iterator();

		int count = 0;
		while (itr.hasNext()) {
			count++;

			Assert.assertTrue(message, count <= expected.length);

			T item = itr.next();
			Assert.assertTrue(message, Objects.equals(item, expected[count - 1]));
{'fraction_non_alphanumeric': 0.13534566699123662, 'fraction_numerical': 0.006815968841285297, 'mean_word_length': 4.922190201729107, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 21, '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': '137638', 'n_tokens_mistral': 719, 'n_tokens_neox': 678, 'n_words': 154}