Пример #1
0
 public void Should_throw_if_value_type_is_struct_and_string_based_key_is_null()
 {
     StringBasedStructValueObjectTypeConverter.Invoking(c => c.ConvertFrom(null))
     .Should().Throw <NotSupportedException>()
     .WithMessage("StringBasedStructValueObject is a struct and cannot be converted from 'null'.");
 }
 public void Should_return_true_if_value_type_is_struct_and_key_type_matches_the_reference_type_key()
 {
     StringBasedStructValueObjectTypeConverter.ConvertTo(StringBasedStructValueObject.Create("value"), typeof(string)).Should().Be("value");
 }
 public void Should_return_true_if_value_type_is_struct_and_key_type_matches_the_reference_type_key()
 {
     StringBasedStructValueObjectTypeConverter.CanConvertFrom(typeof(string)).Should().BeTrue();
 }