예제 #1
0
 public Mock(string method, string route, IRawTemplate rawTemplate, bool hasCondition)
 {
     Method       = method;
     Route        = route;
     RawTemplate  = rawTemplate;
     HasCondition = hasCondition;
 }
예제 #2
0
        public async Task <Template> Transform(IRawTemplate rawTemplate, IScriptContext scriptContext)
        {
            scriptContext.Global.DisableWriting();

            var transformedTemplate = await Transform(rawTemplate.Content, scriptContext);

            return(JsonConvert.DeserializeObject <Template>(transformedTemplate));
        }