Exemple #1
0
        public void LogExceptionUsingXmlExceptionLogger()
        {
            var testStorageResult = new TestStorageResult();

            Storage.Reset(testStorageResult.Storage);

            new XmlFileExceptionLogger(@"C:\Logging\Test")
            .Error(new InvalidOperationException("Custom message", new ArgumentException("Argument not valid.")));

            testStorageResult.OperationsLog.Should().HaveCount(4);
            testStorageResult.OperationsLog[3].Item1.Should().Be("Save");
        }
		public void LogExceptionUsingXmlExceptionLogger()
		{
			var testStorageResult = new TestStorageResult();

			Storage.Reset(testStorageResult.Storage);

			new XmlFileExceptionLogger(@"C:\Logging\Test")
				.Error(new InvalidOperationException("Custom message", new ArgumentException("Argument not valid.")));

			testStorageResult.OperationsLog.Should().Have.Count.EqualTo(4);
			testStorageResult.OperationsLog[3].Item1.Should().Be.EqualTo("Save");
		}