Skip to content

Commit

Permalink
added test for file logger
Browse files Browse the repository at this point in the history
  • Loading branch information
Durieux Pol committed Feb 14, 2024
1 parent 166072f commit 89a9d76
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/MuTalk-Tests/MTAnalysisFileLoggerTest.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Class {
#name : 'MTAnalysisFileLoggerTest',
#superclass : 'TestCase',
#category : 'MuTalk-Tests',
#package : 'MuTalk-Tests'
}

{ #category : 'tests' }
MTAnalysisFileLoggerTest >> testLogFileExists [

| analysis logFileName logFile |
logFileName := 'logFileForTest.txt'.
logFile := logFileName asFileReference.
analysis := MTAnalysis new
classesToMutate: { MTAuxiliarClassForMTAnalysis };
testClasses: { MTAuxiliarClassForMTAnalysisTest };
logger: (MTAnalysisFileLogger toFileNamed: logFileName).

analysis run.

self assert: logFile exists.
logFile delete
]

0 comments on commit 89a9d76

Please sign in to comment.