示例#1
0
        public void implicit_conversion_from_string_should_return_expected_result_when_value_is_null()
        {
            WriteConcern.WValue result = "mode";

            result.Should().BeOfType <WriteConcern.WMode>();
            ((WriteConcern.WMode)result).Value.Should().Be("mode");
        }
示例#2
0
        public void implicit_conversion_from_nullable_int_should_return_expected_result_when_value_is_not_null()
        {
            WriteConcern.WValue result = (int?)1;

            result.Should().BeOfType <WriteConcern.WCount>();
            ((WriteConcern.WCount)result).Value.Should().Be(1);
        }
示例#3
0
        public void implicit_conversion_from_int_should_return_expected_result()
        {
            WriteConcern.WValue result = 1;

            result.Should().BeOfType <WriteConcern.WCount>();
            ((WriteConcern.WCount)result).Value.Should().Be(1);
        }
示例#4
0
        public void implicit_conversion_from_string_should_return_expected_result_when_value_is_not_null()
        {
            WriteConcern.WValue result = (string)null;

            result.Should().BeNull();
        }
示例#5
0
        public void implicit_conversion_from_nullable_int_should_return_expected_result_when_value_is_null()
        {
            WriteConcern.WValue result = (int?)null;

            result.Should().BeNull();
        }
示例#6
0
 public void Static_implicit_conversion_with_null_string_argument_returns_properly_initialized_instance()
 {
     WriteConcern.WValue wValue = (string)null;
     wValue.Should().BeNull();
 }
示例#7
0
 public void Static_implicit_conversion_with_string_argument_returns_properly_initialized_instance()
 {
     WriteConcern.WValue wValue = "mode";
     wValue.Should().BeOfType <WriteConcern.WMode>();
     ((WriteConcern.WMode)wValue).Value.Should().Be("mode");
 }
示例#8
0
 public void Static_implicit_conversion_with_nullable_int_argument_returns_properly_initialized_instance()
 {
     WriteConcern.WValue wValue = (int?)1;
     wValue.Should().BeOfType <WriteConcern.WCount>();
     ((WriteConcern.WCount)wValue).Value.Should().Be(1);
 }