public void WhenGetApplicationProperty_IfAppExist_ShouldReturnProperty() { // Arrange const string configPath = "app.config"; _mock.MockIisExpressConfig_ApplicationConfigFound(configPath) .MockIisExpressConfig_RealDocumentInitialized(configPath); // Act var config = new IisExpressConfig(configPath, _mock.FileSystem.Object); var property = config.GetApplicationProperty("", "physicalPath"); // Assert Assert.Equal(@"%IIS_SITES_HOME%\WebSite1", property); }
public void WhenGetApplicationProperty_IfAppNotFound_ShouldReturnNull() { // Arrange const string configPath = "app.config"; _mock.MockIisExpressConfig_ApplicationConfigFound(configPath) .MockIisExpressConfig_RealDocumentInitialized(configPath); // Act var config = new IisExpressConfig(configPath, _mock.FileSystem.Object); var property = config.GetApplicationProperty("unknownapp", "unknownproperty"); // Assert Assert.Null(property); }