Skip to content

Commit

Permalink
Update EnumerableConversionTests.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
mackysoft committed Jan 28, 2021
1 parent 2f169d8 commit fb8d48f
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
using System.Collections.Generic;
using UnityEngine;
using NUnit.Framework;
using MackySoft.Choice.Internal;

namespace MackySoft.Choice.Tests {
namespace MackySoft.Choice.Internal.Tests {

public class EnumerableConversionTests {

class Item {
Expand All @@ -13,7 +13,7 @@ class Item {

[Test]
public void EnumerableToTemporaryArray () {
Item[] source = GenerateItemEnumerable().ToArray();
Item[] source = GenerateEnumerable().ToArray();

EnumerableConversion.EnumerableToTemporaryArray(source.Select(x => x),x => x.weight,out var items,out var weights);

Expand All @@ -29,7 +29,7 @@ public void EnumerableToTemporaryArray () {

[Test]
public void ReadOnlyListToTemporaryArray () {
Item[] source = GenerateItemEnumerable().ToArray();
Item[] source = GenerateEnumerable().ToArray();

EnumerableConversion.EnumerableToTemporaryArray(source,x => x.weight,out var items,out var weights);

Expand All @@ -45,7 +45,7 @@ public void ReadOnlyListToTemporaryArray () {

[Test]
public void ListToTemporaryArray () {
List<Item> source = GenerateItemEnumerable().ToList();
List<Item> source = GenerateEnumerable().ToList();

EnumerableConversion.EnumerableToTemporaryArray(source,x => x.weight,out var items,out var weights);

Expand Down Expand Up @@ -93,7 +93,7 @@ public void DictionaryEnumerableToTemporaryArray () {
weights.Dispose();
}

static IEnumerable<Item> GenerateItemEnumerable () {
static IEnumerable<Item> GenerateEnumerable () {
for (int i = 0;100 > i;i++) {
yield return new Item { weight = Random.value };
}
Expand Down

0 comments on commit fb8d48f

Please sign in to comment.