mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 10:11:10 +00:00
Formats code comments as sentences in the tests.
Capitalizes the first word and adds the terminal period in the unit, integration and security tests. The AAA markers stay bare, the TODO bodies stay lowercase, and no assertion, payload, expected status code or test signature changes.
This commit is contained in:
1 parent
727aa33318
commit
057f557791
540 files changed
+3888
-3888
No files matched your search
+17
-17
@@ -65,9 +65,9 @@ public class ScheduledJobTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(null)] // null name
|
||||
[InlineData("")] // empty name
|
||||
[InlineData(" ")] // whitespace name
|
||||
[InlineData(null)] // Null name.
|
||||
[InlineData("")] // Empty name.
|
||||
[InlineData(" ")] // Whitespace name.
|
||||
public void Create_WhenNameIsEmptyOrWhitespace_ShouldReturnError(string? name)
|
||||
{
|
||||
// Act
|
||||
@@ -124,9 +124,9 @@ public class ScheduledJobTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(ScheduledJobStatus.Active)] // cannot add an already active scheduled job
|
||||
[InlineData(ScheduledJobStatus.Running)] // cannot add a running scheduled job
|
||||
[InlineData(ScheduledJobStatus.Completed)] // cannot add a completed scheduled job
|
||||
[InlineData(ScheduledJobStatus.Active)] // Cannot add an already active scheduled job.
|
||||
[InlineData(ScheduledJobStatus.Running)] // Cannot add a running scheduled job.
|
||||
[InlineData(ScheduledJobStatus.Completed)] // Cannot add a completed scheduled job.
|
||||
public void Add_WhenStatusIsNotAdded_ShouldReturnError(ScheduledJobStatus status)
|
||||
{
|
||||
// Arrange
|
||||
@@ -159,8 +159,8 @@ public class ScheduledJobTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(ScheduledJobStatus.Active)] // cannot start an already active execution cycle
|
||||
[InlineData(ScheduledJobStatus.Running)] // cannot start a running execution cycle
|
||||
[InlineData(ScheduledJobStatus.Active)] // Cannot start an already active execution cycle.
|
||||
[InlineData(ScheduledJobStatus.Running)] // Cannot start a running execution cycle.
|
||||
public void StartCycle_WhenCycleAlreadyStarted_ShouldReturnError(ScheduledJobStatus status)
|
||||
{
|
||||
// Arrange
|
||||
@@ -217,8 +217,8 @@ public class ScheduledJobTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(ScheduledJobStatus.Added)] // cannot stop a cycle that was never started
|
||||
[InlineData(ScheduledJobStatus.Completed)] // cannot stop a finished one time execution
|
||||
[InlineData(ScheduledJobStatus.Added)] // Cannot stop a cycle that was never started.
|
||||
[InlineData(ScheduledJobStatus.Completed)] // Cannot stop a finished one time execution.
|
||||
public void StopCycle_WhenCycleWasNeverStarted_ShouldReturnError(ScheduledJobStatus status)
|
||||
{
|
||||
// Arrange
|
||||
@@ -285,8 +285,8 @@ public class ScheduledJobTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(true)] // cycle run
|
||||
[InlineData(false)] // one time run
|
||||
[InlineData(true)] // Cycle run.
|
||||
[InlineData(false)] // One time run.
|
||||
public void MarkExecutionStarted_WhenStatusIsNotRunning_ShouldTransitionToRunningAndRaiseExecutionStartedEvent(bool isCycleRun)
|
||||
{
|
||||
// Arrange
|
||||
@@ -326,8 +326,8 @@ public class ScheduledJobTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(true)] // a cycle run returns the scheduled job to its active status
|
||||
[InlineData(false)] // a one time execution completes the scheduled job
|
||||
[InlineData(true)] // A cycle run returns the scheduled job to its active status.
|
||||
[InlineData(false)] // A one time execution completes the scheduled job.
|
||||
public void MarkExecutionCompleted_WhenStatusIsRunning_ShouldTransitionStatusAndRaiseExecutionCompletedEvent(bool isCycleRun)
|
||||
{
|
||||
// Arrange
|
||||
@@ -352,9 +352,9 @@ public class ScheduledJobTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(ScheduledJobStatus.Added)] // cannot complete an execution that never started
|
||||
[InlineData(ScheduledJobStatus.Active)] // cannot complete an execution that never started
|
||||
[InlineData(ScheduledJobStatus.Completed)] // cannot complete an already completed execution
|
||||
[InlineData(ScheduledJobStatus.Added)] // Cannot complete an execution that never started.
|
||||
[InlineData(ScheduledJobStatus.Active)] // Cannot complete an execution that never started.
|
||||
[InlineData(ScheduledJobStatus.Completed)] // Cannot complete an already completed execution.
|
||||
public void MarkExecutionCompleted_WhenStatusIsNotRunning_ShouldReturnError(ScheduledJobStatus status)
|
||||
{
|
||||
// Arrange
|
||||
|
||||
+6
-6
@@ -29,8 +29,8 @@ public class DailyScheduleTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(-1)] // hour below the allowed range
|
||||
[InlineData(24)] // hour above the allowed range
|
||||
[InlineData(-1)] // Hour below the allowed range.
|
||||
[InlineData(24)] // Hour above the allowed range.
|
||||
public void Create_WhenHourIsOutOfRange_ShouldReturnError(int hour)
|
||||
{
|
||||
// Act
|
||||
@@ -42,8 +42,8 @@ public class DailyScheduleTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(-1)] // minute below the allowed range
|
||||
[InlineData(60)] // minute above the allowed range
|
||||
[InlineData(-1)] // Minute below the allowed range.
|
||||
[InlineData(60)] // Minute above the allowed range.
|
||||
public void Create_WhenMinuteIsOutOfRange_ShouldReturnError(int minute)
|
||||
{
|
||||
// Act
|
||||
@@ -131,8 +131,8 @@ public class DailyScheduleTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(9, 30)] // different hour
|
||||
[InlineData(8, 31)] // different minute
|
||||
[InlineData(9, 30)] // Different hour.
|
||||
[InlineData(8, 31)] // Different minute.
|
||||
public void Equals_WhenHourOrMinuteDiffer_ShouldReturnFalse(int hour, int minute)
|
||||
{
|
||||
// Act
|
||||
|
||||
+3
-3
@@ -28,9 +28,9 @@ public class IntervalScheduleTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(0)] // interval of zero
|
||||
[InlineData(-1)] // negative interval
|
||||
[InlineData(-100)] // negative interval far from zero
|
||||
[InlineData(0)] // Interval of zero.
|
||||
[InlineData(-1)] // Negative interval.
|
||||
[InlineData(-100)] // Negative interval far from zero.
|
||||
public void Create_WhenIntervalIsNotPositive_ShouldReturnError(int intervalMinutes)
|
||||
{
|
||||
// Act
|
||||
|
||||
Reference in new issue
Block a user