Skip to content

Commit

Permalink
Review
Browse files Browse the repository at this point in the history
  • Loading branch information
ITaluone committed Apr 6, 2022
1 parent d6f8ca8 commit 6c0c015
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions Tests/Benchmarks/UsersOfGetClosedGenericInterfaces.cs
Expand Up @@ -30,7 +30,7 @@ private class Context : IEquivalencyValidationContext
public INode CurrentNode { get; }
public Reason Reason { get; }
public Tracer Tracer { get; }
public IEquivalencyAssertionOptions Options { get; }
public IEquivalencyAssertionOptions Options { get; internal set; }
public bool IsCyclicReference(object expectation) => throw new NotImplementedException();

public IEquivalencyValidationContext AsNestedMember(IMember expectationMember) => throw new NotImplementedException();
Expand Down Expand Up @@ -147,25 +147,27 @@ public void GlobalSetup()
break;

default:
{
if (DataType == typeof(TimeSpan))
values[i] = faker.Date.Future() - faker.Date.Future();
else if (DataType == typeof(Guid))
values[i] = faker.Random.Guid();
else if (DataType == typeof(Dictionary<int, int>))
values[i] = new Dictionary<int, int>() { { faker.Random.Int(), faker.Random.Int() } };
else if (DataType == typeof(IEnumerable<int>))
values[i] = new int[] { faker.Random.Int(), faker.Random.Int() };
else
throw new Exception("Unable to populate data of type " + DataType);

break;
}
{
if (DataType == typeof(TimeSpan))
values[i] = faker.Date.Future() - faker.Date.Future();
else if (DataType == typeof(Guid))
values[i] = faker.Random.Guid();
else if (DataType == typeof(Dictionary<int, int>))
values[i] = new Dictionary<int, int>() { { faker.Random.Int(), faker.Random.Int() } };
else if (DataType == typeof(IEnumerable<int>))
values[i] = new int[] { faker.Random.Int(), faker.Random.Int() };
else
throw new Exception("Unable to populate data of type " + DataType);

break;
}
}
}

context = new Context();
new Config();
context = new Context()
{
Options = new Config()
};
}

[Benchmark]
Expand Down

0 comments on commit 6c0c015

Please sign in to comment.