예제 #1
0
        public void Test_UpdateCellsByBucket_ParameterInvalid_InvalidValueException()
        {
            var excelService = A.Fake <IExcelService>();

            A.CallTo(() => excelService.ExcelExists()).Returns(true);

            var command = new InsertBucketCommand(excelService);

            command.Execute(new string[] { "B", "a", "3", "o" });
        }
예제 #2
0
        public void Test_UpdateCellsByBucket_ExcelNotExists_ExcelNotCreatedException()
        {
            var excelService = A.Fake <IExcelService>();

            A.CallTo(() => excelService.ExcelExists()).Returns(false);

            var command = new InsertBucketCommand(excelService);

            command.Execute(new string[] { "B", "10", "3", "o" });
        }
        public void Test_UpdateCell_FiveParameters_InvalidValueException()
        {
            var excelService = A.Fake <IExcelService>();

            A.CallTo(() => excelService.ExcelExists()).Returns(true);

            var command = new InsertBucketCommand(excelService);

            command.Execute(new string[] { "N", "1", "2", "2", "p" });
        }
예제 #4
0
        public void Test_UpdateCellsByBucket_10_3_o_Success()
        {
            var excelService = A.Fake <IExcelService>();

            A.CallTo(() => excelService.ExcelExists()).Returns(true);

            var command = new InsertBucketCommand(excelService);

            command.Execute(new string[] { "B", "10", "3", "o" });

            A.CallTo(() => excelService.UpdateCellsByBucket(10, 3, "o")).MustHaveHappenedOnceExactly();
        }