Example #1
0
    public void ToStringWithVariables(string value, bool isVariable, string expected)
    {
        var variables = A.Fake <IVariableDictionary>(i => i.Strict());

        A.CallTo(() => variables["alpha"]).Returns("omega");
        A.CallTo(() => variables["value"]).Returns(12345);
        A.CallTo(() => variables["undefined"]).Returns(null);

        var sut    = new InterpolatedValue(value, isVariable);
        var actual = sut.ToString(variables);

        actual.Should().Be(expected);
    }
Example #2
0
    public void ToStringWithoutVariables(string value, bool isVariable, string toString)
    {
        var sut = new InterpolatedValue(value, isVariable);

        sut.ToString().Should().Be(toString);
    }