public void SourceReader_WillIgnoreElementsNotOrdered() { /* * ElementID BL Desc BL Id BL Color TLG Color Henrik Alice Simpson * 111 Brick1 BB1 Red Real Read 1 1 1 * 222 Brick2 BB2 Blue Bright Blue 0 0 0 * 333 Brick3 BB3 Green Dark Green 1 1 1 */ var parameters = new InputParameters(); parameters.ElementIdSpan = "A2A4"; parameters.BrickLinkDescriptionSpan = "B2B4"; parameters.BrickLinkIdSpan = "C2C4"; parameters.BrickLinkColorSpan = "D2D4"; parameters.TlgColorSpan = "E2E4"; parameters.BuyersSpan = "F1H1"; var sheet = new Mock <IXLWorksheet>(); ExcelMocker.AddMockRange(sheet, "A2A4"); ExcelMocker.AddMockRange(sheet, "B2B4"); ExcelMocker.AddMockRange(sheet, "C2C4"); ExcelMocker.AddMockRange(sheet, "D2D4"); ExcelMocker.AddMockRange(sheet, "E2E4"); ExcelMocker.AddMockRange(sheet, "F1H1"); ExcelMocker.CreateMockCell("111", 2, 1, sheet); ExcelMocker.CreateMockCell("222", 3, 1, sheet); ExcelMocker.CreateMockCell("333", 4, 1, sheet); ExcelMocker.CreateMockCell("Brick1", 2, 2, sheet); ExcelMocker.CreateMockCell("Brick2", 3, 2, sheet); ExcelMocker.CreateMockCell("Brick3", 4, 2, sheet); ExcelMocker.CreateMockCell("BB1", 2, 3, sheet); ExcelMocker.CreateMockCell("BB2", 3, 3, sheet); ExcelMocker.CreateMockCell("BB3", 4, 3, sheet); ExcelMocker.CreateMockCell("Red", 2, 4, sheet); ExcelMocker.CreateMockCell("Blue", 3, 4, sheet); ExcelMocker.CreateMockCell("Green", 4, 4, sheet); ExcelMocker.CreateMockCell("Real Red", 2, 5, sheet); ExcelMocker.CreateMockCell("Bright Blue", 3, 5, sheet); ExcelMocker.CreateMockCell("Dark Green", 4, 5, sheet); ExcelMocker.CreateMockCell("Henrik", 1, 6, sheet); ExcelMocker.CreateMockCell("Alice", 1, 7, sheet); ExcelMocker.CreateMockCell("Simpson", 1, 8, sheet); ExcelMocker.CreateMockCell("1", 2, 6, sheet); ExcelMocker.CreateMockCell("1", 2, 7, sheet); ExcelMocker.CreateMockCell("1", 2, 8, sheet); ExcelMocker.CreateMockCell("0", 3, 6, sheet); ExcelMocker.CreateMockCell("", 3, 7, sheet); ExcelMocker.CreateMockCell("-1", 3, 8, sheet); ExcelMocker.CreateMockCell("1", 4, 6, sheet); ExcelMocker.CreateMockCell("1", 4, 7, sheet); ExcelMocker.CreateMockCell("1", 4, 8, sheet); var reader = new SourceReader(sheet.Object, parameters); var result = reader.GetElements(); Assert.That(result.Count, Is.EqualTo(2)); Assert.That(result[0].ElementID, Is.EqualTo("111")); Assert.That(result[0].BricklinkDescription, Is.EqualTo("Brick1")); Assert.That(result[0].BricklinkId, Is.EqualTo("BB1")); Assert.That(result[0].BricklinkColor, Is.EqualTo("Red")); Assert.That(result[0].MaterialColor, Is.EqualTo("Real Red")); Assert.That(result[1].ElementID, Is.EqualTo("333")); Assert.That(result[1].BricklinkDescription, Is.EqualTo("Brick3")); Assert.That(result[1].BricklinkId, Is.EqualTo("BB3")); Assert.That(result[1].BricklinkColor, Is.EqualTo("Green")); Assert.That(result[1].MaterialColor, Is.EqualTo("Dark Green")); }