public void should_deterministically_create_value()
{
var factory = Substitute.For<Func<string>>();
factory.Invoke().Returns("hai");
var value = new SimpleValue(typeof(string).ToCachedType());
var lazy = new LazyValue(value, factory);
value.Instance.ShouldBeNull();
for (var i = 0; i < 5; i++)
{
lazy.EnsureValue();
lazy.SpecifiedType.Type.ShouldBe<string>();
lazy.ActualType.Type.ShouldBe<string>();
value.Instance.ShouldEqual("hai");
}
factory.Received(1);
}