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);
		}
Ejemplo n.º 2
0
		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));
		}
Ejemplo n.º 3
0
		public void SetServerInformation(ServerInformation information)
		{
			if (information == null)
			{
				throw new ArgumentNullException("information");
			}

			ServerInformation = information;
		}