【发布时间】:2019-07-10 13:14:34
【问题描述】:
我想使用 Autofixture 创建一个类的实例,我从 3rd 方库中使用该实例。
我面临的问题是这个类的构造函数有一个内部访问修饰符,并且来自第 3 方解决方案我不能真正使用 InternalsVisibleTo 属性,所以我想知道是否有任何 Autofixture 行为可以使用或者是否有任何替代技术可以应用于此类场景。
public class RecordedEvent
{
/// <summary>The Event Stream that this event belongs to</summary>
public readonly string EventStreamId;
/// <summary>The Unique Identifier representing this event</summary>
public readonly Guid EventId;
/// <summary>The number of this event in the stream</summary>
.....
internal RecordedEvent(....)
{
.....
}
}
【问题讨论】:
标签: autofixture