Exemplo n.º 1
0
        public void Create_WhenTargetTypeIsIntegerAndValueIsString_ReturnsIntegerValue()
        {
            var factory = new BasicParameterValueFactory();

            var result = factory.Create(typeof(int), new ExecutableParameterInfo("value", "123"));

            result.Should().Be(123);
        }
Exemplo n.º 2
0
        public void Create_WhenTargetTypeIsStringAndValueIsString_ReturnsStringValue()
        {
            var factory = new BasicParameterValueFactory();

            var result = factory.Create(typeof(string), new ExecutableParameterInfo("value", "foo"));

            result.Should().Be("foo");
        }