public void Should_return_self_if_converted_from_itself() { var valueObject = IntBasedStructValueObject.Create(42); IntBasedStructValueObjectTypeConverter.ConvertFrom(valueObject).Should().Be(valueObject); }
public void Should_return_valid_instance_if_converted_from_nullable_type_of_itself() { IntBasedStructValueObject?valueObject = IntBasedStructValueObject.Create(42); IntBasedStructValueObjectTypeConverter.ConvertFrom(valueObject).Should().Be(valueObject.Value); }
public void Should_return_valid_instance_if_value_type_is_struct_and_key_matches_the_struct_key() { IntBasedStructValueObjectTypeConverter.ConvertFrom(42).Should().BeEquivalentTo(IntBasedStructValueObject.Create(42)); }