public void TestJavascriptSimpleModel()
        {
            var generator = new JavascriptClientTemplateGenerator("repo", CreateClientTemplateGenerator());

            var view = generator.Generate(new StringTemplateInfo("test", "hallo {{value}}"));

            Assert.NotNull(view);

            var model = new Dictionary<string, object>
                {
                    { "value", "test" }
                };

            var result = ExecuteJavascript(view, model, "test");
            Assert.Equal("hallo test", result);
        }
		public async Task<HttpResponseMessage> Get(string path)
		{
		    var templateInfo = await _templateRepository.GetTemplateAsync(path).ConfigureAwait(false);
			if (templateInfo == null)
				return new HttpResponseMessage(HttpStatusCode.NotFound);

			var generator = new JavascriptClientTemplateGenerator("Tcn.TemplateRepository", _clientFactory.Create());
			var message = new HttpResponseMessage
			{
				Content = new StringContent(generator.Generate(templateInfo))
			};

			message.Content.Headers.ContentType = new MediaTypeHeaderValue("application/javascript");

			return message;
		}
        private string ExecuteClientSide(string testName, string templateFile, string dataFile)
        {
            var namingRule = new NamingRule();
            var handlerFactory = new NullRenderingHelperHandlerFactory();

            var clientGenerator = new ClientTemplateGenerator(handlerFactory, new MemberLocatorFromNamingRule(namingRule));
            var generator = new JavascriptClientTemplateGenerator("repo", clientGenerator);

            var templateInfo = new FileTemplateInfo(testName, PathInfo.Create(templateFile), new FileSystem());
            var view = generator.Generate(templateInfo);

            Dictionary<string, object> model;
            using (var reader = new StreamReader(dataFile))
            {
                model = (Dictionary<string, object>) new JavaScriptSerializer().Deserialize(reader.ReadToEnd(), typeof(Dictionary<string, object>));
            }

            CleanupModel(model);

            var result = JavascriptClientTest.ExecuteJavascript(view, model, testName);
            return result;
        }