Beispiel #1
0
		public void RowsShouldReturnNbrOfRowsForEntireColumn()
		{
			var func = new Rows();
			var parsingContext = ParsingContext.Create();
			parsingContext.ExcelDataProvider = MockRepository.GenerateStub<ExcelDataProvider>();
			var result = func.Execute(FunctionsHelper.CreateArgs("A:B"), parsingContext);
			Assert.AreEqual(1048576, result.Result);
		}
Beispiel #2
0
		public void RowsWithInvalidArgumentReturnsPoundValue()
		{
			var func = new Rows();
			var parsingContext = ParsingContext.Create();
			var args = FunctionsHelper.CreateArgs();
			var result = func.Execute(args, parsingContext);
			Assert.AreEqual(eErrorType.Value, ((ExcelErrorValue)result.Result).Type);
		}
Beispiel #3
0
		public void RowsShouldReturnNbrOfRowsSuppliedRange()
		{
			var func = new Rows();
			var parsingContext = ParsingContext.Create();
			parsingContext.ExcelDataProvider = MockRepository.GenerateStub<ExcelDataProvider>();
			var result = func.Execute(FunctionsHelper.CreateArgs("A1:B3"), parsingContext);
			Assert.AreEqual(3, result.Result);
		}