Site environment properties, initialized from ISimplifyWebSettings
Inheritance: IEnvironment
示例#1
0
		public void Constructor_BackslashPath_BackslashAdded()
		{
			// Act
			var env = new Environment(@"C:\Test\", _settings);

			// Assert
			Assert.AreEqual("C:/Test/Templates/", env.TemplatesPhysicalPath);
		}
示例#2
0
		public void Constructor_DefaultParameters_PropertiesSetCorrectly()
		{
			// Act
			var env = new Environment("C:/Test", _settings);

			// Assert

			Assert.AreEqual("Main", env.SiteStyle);
			Assert.AreEqual("Templates", env.TemplatesPath);
			Assert.AreEqual("Master.tpl", env.MasterTemplateFileName);
			Assert.AreEqual("Templates", env.TemplatesPath);
			Assert.AreEqual("C:/Test/Templates/", env.TemplatesPhysicalPath);
			Assert.AreEqual("App_Data", env.DataPath);
			Assert.AreEqual("C:/Test/App_Data/", env.DataPhysicalPath);
		}