Example #1
0
    public Task ConvertWithCanConvert_Valid()
    {
        var target = new CanConvertTarget
        {
            Value = "Valid"
        };

        return(Verifier.Verify(target));
    }
Example #2
0
    public Task ConvertWithCanConvert_Valid()
    {
        VerifierSettings.RegisterFileConverter <CanConvertTarget>(
            (instance, _) =>
        {
            var streams = ToStream(instance.Value);
            return(new ConversionResult(null, streams.Select(x => new ConversionStream("txt", x))));
        },
            (inner, settings) => inner.Value == "Valid");
        var target = new CanConvertTarget
        {
            Value = "Valid"
        };

        return(Verifier.Verify(target));
    }
Example #3
0
    public Task ConvertWithCanConvert_Valid()
    {
        SharedVerifySettings.RegisterFileConverter <CanConvertTarget>(
            "txt",
            (instance, _) =>
        {
            var streams = ToStream(instance.Value);
            return(new ConversionResult(null, streams));
        },
            o => o.Value == "Valid");
        var target = new CanConvertTarget
        {
            Value = "Valid"
        };

        return(Verifier.Verify(target));
    }