public void ASP_NET() { using (var appPath = new PathWithFileNamed("Web.config")) { DetetectedFramework df = FrameworkDetetctor.Detect(appPath.DirectoryPath); Assert.Equal("aspdotnet", df.Framework); Assert.Equal("aspdotnet40", df.Runtime); } }
public void Sinatra() { using (var appPath = new PathWithFileNamed("app.rb", null, "require 'sinatra'")) { DetetectedFramework df = FrameworkDetetctor.Detect(appPath.DirectoryPath); Assert.Equal("sinatra", df.Framework); Assert.Equal("ruby19", df.Runtime); } }
public void Rails() { using (var appPath = new PathWithFileNamed("environment.rb", "config")) { DetetectedFramework df = FrameworkDetetctor.Detect(appPath.DirectoryPath); Assert.Equal("rails3", df.Framework); Assert.Equal("ruby19", df.Runtime); } }
public void PHP() { using (var appPath = new PathWithFileNamed("index.php")) { DetetectedFramework df = FrameworkDetetctor.Detect(appPath.DirectoryPath); Assert.Equal("php", df.Framework); Assert.Equal("php", df.Runtime); } }
public void Node() { using (var appPath = new PathWithFileNamed("app.js")) { DetetectedFramework df = FrameworkDetetctor.Detect(appPath.DirectoryPath); Assert.Equal("node", df.Framework); Assert.Equal("node", df.Runtime); } }
public void Rack() { using (var appPath = new PathWithFileNamed("config.ru")) { DetetectedFramework df = FrameworkDetetctor.Detect(appPath.DirectoryPath); Assert.Equal("rack", df.Framework); Assert.Equal("ruby19", df.Runtime); } }
public void Erlang() { using (var appPath = new PathWithFileNamed("foo.rel", "releases")) { DetetectedFramework df = FrameworkDetetctor.Detect(appPath.DirectoryPath); Assert.Equal("otp_rebar", df.Framework); Assert.Equal("erlangR14B02", df.Runtime); } }
public void WSGI() { using (var appPath = new PathWithFileNamed("wsgi.py")) { DetetectedFramework df = FrameworkDetetctor.Detect(appPath.DirectoryPath); Assert.Equal("wsgi", df.Framework); Assert.Equal("python2", df.Runtime); } }
public void Django() { using (var appPath = new PathWithFileNamed("manage.py")) { DetetectedFramework df = FrameworkDetetctor.Detect(appPath.DirectoryPath); Assert.Equal("django", df.Framework); Assert.Equal("python2", df.Runtime); } }
public void WarFile() { // testapp.war string currentDir = Environment.CurrentDirectory; Assert.True(File.Exists(Path.Combine(currentDir, "testapp.war"))); DetetectedFramework df = FrameworkDetetctor.Detect(new DirectoryInfo(currentDir)); Assert.Equal("java_web", df.Framework); Assert.Equal("java", df.Runtime); }
public void Grails() { using (var appPath = new PathWithFileNamed("web.xml", "WEB-INF")) { DirectoryInfo appDir = appPath.DirectoryPath; string webInfLibDir = Path.Combine(appDir.FullName, "WEB-INF", "lib"); Directory.CreateDirectory(webInfLibDir); File.WriteAllText(Path.Combine(webInfLibDir, "grails-web.foofoo1234.jar"), "CONTENTS"); DetetectedFramework df = FrameworkDetetctor.Detect(appPath.DirectoryPath); Assert.Equal("grails", df.Framework); Assert.Equal("java", df.Runtime); } }