public void op_ToEntity_whenNullValue() { var obj = new Record<string> { Value = null }; Assert.Null(obj.ToEntity()); }
public void op_ToEntity() { var obj = new Record<int> { Value = 123 }; const string expected = "123"; var actual = obj.ToEntity(); Assert.Equal(expected, actual); }
public void op_ToEntity_whenIEntity() { const string expected = "123"; var value = new Mock<IEntity>(); value .Setup(x => x.ToEntity()) .Returns(expected) .Verifiable(); var obj = new Record<IEntity> { Value = value.Object }; var actual = obj.ToEntity(); Assert.Equal(expected, actual); value.VerifyAll(); }