public Task ConvertWithCanConvert_Valid() { var target = new CanConvertTarget { Value = "Valid" }; return(Verifier.Verify(target)); }
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)); }
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)); }