private void SetServerInformation()
		{
			var serverInformation = new ServerInformation();
			
			serverInformation.Host = _errorLog.Host;
			serverInformation.Name = _errorLog.ServerVariables.GetValueFromFirstMatch("SERVER_NAME");
			serverInformation.Port = _errorLog.ServerVariables.GetValueFromFirstMatch("SERVER_PORT");
			serverInformation.Software = _errorLog.ServerVariables.GetValueFromFirstMatch("SERVER_SOFTWARE");

			_errorLog.SetServerInformation(serverInformation);
		}
		public void SetServerInformation_SetsInformation()
		{
			// arrange
			var error = new ErrorLog();
			var info = new ServerInformation();

			// act
			error.SetServerInformation(info);

			// assert
			Assert.That(error.ServerInformation, Is.EqualTo(info));
		}
示例#3
0
		public void SetServerInformation(ServerInformation information)
		{
			if (information == null)
			{
				throw new ArgumentNullException("information");
			}

			ServerInformation = information;
		}