public void PrepareDate_PathFale_Exception() { ReportViwer viwer = new ReportViwer(new FakeFileService()); int BlockCount = viwer.GetBlockCount(); Assert.Throws <NullReferenceException>(() => viwer.PrepareDate(@"D:\Laboratory_work")); }
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)); }
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")); }
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)); }
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); }