added unit tests for PartialTimeRuleTest
minor refactoring