NavfertyExcelAddIn.UnitTests.WorksheetCellsEditing.ConditionalFormatFixerTests.VerifyPasted(Moq.Mock)

Here are the examples of the csharp api NavfertyExcelAddIn.UnitTests.WorksheetCellsEditing.ConditionalFormatFixerTests.VerifyPasted(Moq.Mock) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

4 Examples 7

19 Source : ConditionalFormatFixerTests.cs
with MIT License
from navferty

[TestMethod]
		public void RepairConditionalFormat_FirstRowWithoutFormat_CopiedFromSecondRow()
		{
			var firstRow = new RangeBuilder().WithConditionalFormatting(0).WithWorksheet();
			var secondRow = new RangeBuilder().WithConditionalFormatting(2).WithWorksheet().WithCopy();
			var thirdRow = new RangeBuilder().WithConditionalFormatting(0).WithWorksheet();

			var rangeBuilder = new RangeBuilder()
				.WithConditionalFormatting(1)
				.WithWorksheet()
				.WithRows()
				.WithCount(3)
				.WithIndexer(new[] { firstRow.Build(), secondRow.Build(), thirdRow.Build() })
				.WithCopy()
				.WithPaste();
			var selection = rangeBuilder.Build();

			formatFixer.FillRange(selection);

			secondRow.MockObject.Verify(x => x.Copy(Missing.Value), Times.Once);
			VerifyPasted(rangeBuilder.MockObject);
		}

19 Source : ConditionalFormatFixerTests.cs
with MIT License
from navferty

[TestMethod]
		public void RepairConditionalFormat_TwoRowsSelected_FirstToSecond()
		{
			var firstRow = new RangeBuilder().WithConditionalFormatting(1).WithWorksheet().WithCopy();
			var secondRow = new RangeBuilder().WithConditionalFormatting(0).WithWorksheet().WithPaste();

			var rangeBuilder = new RangeBuilder()
				.WithRows()
				.WithCount(2)
				.WithIndexer(new[] { firstRow.Build(), secondRow.Build() });
			var selection = rangeBuilder.Build();

			formatFixer.FillRange(selection);

			firstRow.MockObject.Verify(x => x.Copy(Missing.Value), Times.Once);
			VerifyPasted(secondRow.MockObject);
		}

19 Source : ConditionalFormatFixerTests.cs
with MIT License
from navferty

[TestMethod]
		public void RepairConditionalFormat_TwoRowsSelected_SecondToFirst()
		{
			var firstRow = new RangeBuilder().WithConditionalFormatting(0).WithWorksheet().WithPaste();
			var secondRow = new RangeBuilder().WithConditionalFormatting(1).WithWorksheet().WithCopy();

			var rangeBuilder = new RangeBuilder()
				.WithRows()
				.WithCount(2)
				.WithIndexer(new[] { firstRow.Build(), secondRow.Build() });
			var selection = rangeBuilder.Build();

			formatFixer.FillRange(selection);

			secondRow.MockObject.Verify(x => x.Copy(Missing.Value), Times.Once);
			VerifyPasted(firstRow.MockObject);
		}

19 Source : ConditionalFormatFixerTests.cs
with MIT License
from navferty

[TestMethod]
		public void RepairConditionalFormat_MultipleRows_CopiedFromFirstRow()
		{
			var firstRow = new RangeBuilder().WithConditionalFormatting(1).WithWorksheet().WithCopy();
			var secondRow = new RangeBuilder().WithConditionalFormatting(0).WithWorksheet();
			var thirdRow = new RangeBuilder().WithConditionalFormatting(1).WithWorksheet();
			var lastRow = new RangeBuilder().WithConditionalFormatting(0).WithWorksheet();

			var rangeBuilder = new RangeBuilder()
				.WithConditionalFormatting(1)
				.WithWorksheet()
				.WithRows()
				.WithCount(4)
				.WithIndexer(new[] { firstRow.Build(), secondRow.Build(), thirdRow.Build(), lastRow.Build() })
				.WithPaste();
			var selection = rangeBuilder.Build();

			formatFixer.FillRange(selection);

			firstRow.MockObject.Verify(x => x.Copy(Missing.Value), Times.Once);
			VerifyPasted(rangeBuilder.MockObject);
		}