PageRenderTime 47ms CodeModel.GetById 38ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/Rhino.Etl.Tests/Errors/ErrorsFixture.cs

http://github.com/ayende/rhino-etl
C# | 39 lines | 33 code | 6 blank | 0 comment | 0 complexity | 5a0fde47ec68fbab305ae06352a871a6 MD5 | raw file
 1namespace Rhino.Etl.Tests.Errors
 2{
 3    using System;
 4    using System.Collections.Generic;
 5    using Core;
 6    using Joins;
 7    using Xunit;
 8
 9    
10    public class ErrorsFixture : BaseFibonacciTest
11    {
12        [Fact]
13        public void WillReportErrorsWhenThrown()
14        {
15            using (ErrorsProcess process = new ErrorsProcess())
16            {
17                ICollection<Row> results = new List<Row>();
18                process.RegisterLast(new AddToResults(results));
19
20                process.Execute();
21                Assert.Equal(process.ThrowOperation.RowsAfterWhichToThrow, results.Count);
22                List<Exception> errors = new List<Exception>(process.GetAllErrors());
23                Assert.Equal(1, errors.Count);
24                Assert.Equal("Failed to execute operation Rhino.Etl.Tests.Errors.ThrowingOperation: problem",
25                                errors[0].Message);
26            }
27        }
28
29        [Fact]
30        public void OutputCommandWillRollbackTransactionOnError()
31        {
32            using (ErrorsProcess process = new ErrorsProcess())
33            {
34              
35                
36            }
37        }
38    }
39}