Пример #1
0
        public void PrepareDate_PathFale_Exception()
        {
            ReportViwer viwer      = new ReportViwer(new FakeFileService());
            int         BlockCount = viwer.GetBlockCount();

            Assert.Throws <NullReferenceException>(() => viwer.PrepareDate(@"D:\Laboratory_work"));
        }
Пример #2
0
        public void MergeTemporaryFiles_Path_Get_BlockCount() //Stab
        {
            ReportViwer viwer      = new ReportViwer(new FileService());
            int         BlockCount = viwer.PrepareDate(@"D:\Laboratory_works\Тестирование\File_test\");

            Assert.That(BlockCount, Is.EqualTo(5));
        }
Пример #3
0
        public void PrepareDate_Path_CheckNumberFile() //проверка вызова метода
        {
            ReportViwer viwer = new ReportViwer(_mock_Check.Object);

            viwer.PrepareDate(@"D:\Laboratory_works");
            _mock_Check.Verify(m => m.MergeTemporaryFiles(@"D:\Laboratory_works"));
        }
Пример #4
0
        public void PrepareDate_Path_ZiroNumber() //Stab
        {
            ReportViwer viwer      = new ReportViwer(new FileService());
            int         BlockCount = viwer.PrepareDate(@"D:\Laboratory_works\Тестирование\Filetest\");

            Assert.That(BlockCount, Is.EqualTo(0));
        }
Пример #5
0
        public void Test_interaction_ReportViverAndFakelass()
        {
            FakeFileService moq_fakeFile = new FakeFileService();
            ReportViwer     viwer        = new ReportViwer(moq_fakeFile);

            viwer.PrepareDate(@"D:\Laboratory_works\Тестирование\File_test");
            Assert.IsTrue(moq_fakeFile.Check_FakeFileService);
        }