public void TrySetArgument_Returns_InvalidArgumentValue_When_Value_Expected_But_Not_Set()
        {
            const string argumentName = "someArg";
            var testObject = new StringArgument(_argument, _stringParser);

            string parsedValue;
            _stringParser.Expect(s => s.TryParse(null, out parsedValue)).Return(false);
            _argument.Expect(a => a.TrySetArgumentName(argumentName)).Return(SetArgumentDataResult.Success);

            var actual = testObject.TrySetArgumentNameAndValue(argumentName, null);
            Assert.That(actual, Is.EqualTo(SetArgumentDataResult.InvalidArgumentValue));
            Assert.That(testObject.ParsedSuccessfully, Is.False);
            Assert.That(testObject.ParsedArgumentValue, Is.Null);
        }
        public void TrySetArgument_Returns_Success_And_Sets_Parsing_Related_Properties_When_No_Problems_Encountered()
        {
            const string argumentName = "someArg";
            const string argumentValue = "some argument";
            const string expectedArgumentValue = "some arg value";
            var testObject = new StringArgument(_argument, _stringParser);

            string parsedValue;
            _stringParser.Expect(s => s.TryParse(argumentValue, out parsedValue)).OutRef(expectedArgumentValue).Return(true);
            _argument.Expect(a => a.TrySetArgumentName(argumentName)).Return(SetArgumentDataResult.Success);

            var actual = testObject.TrySetArgumentNameAndValue(argumentName, argumentValue);
            Assert.That(actual, Is.EqualTo(SetArgumentDataResult.Success));
            Assert.That(testObject.ParsedSuccessfully, Is.True);
            Assert.That(testObject.ParsedArgumentValue, Is.EqualTo(expectedArgumentValue));
        }