private void AssertActionsEqual(AlertActionBase expected, AlertActionBase actual, bool compareIds = true) { if (compareIds) { Assert.Equal(expected.Id, actual.Id); } Assert.Equal(expected.Name, actual.Name); Assert.Equal(expected.Configuration, actual.Configuration); }
void AssertActionsEqual(AlertActionBase expected, AlertActionBase actual) { Assert.Equal(expected.Id, actual.Id); Assert.Equal(expected.Name, actual.Name); Assert.Equal(expected.TypeName, actual.TypeName); Assert.Equal(expected.Configuration, actual.Configuration); var logAction = expected as LogToFileAction; if (logAction != null) { Assert.Equal(logAction.FileName, ((LogToFileAction)actual).FileName); Assert.Equal(logAction.TimestampFormat, ((LogToFileAction)actual).TimestampFormat); } var consoleAction = expected as ConsoleLogAction; if (consoleAction != null) { Assert.Equal(consoleAction.TimestampFormat, ((ConsoleLogAction)actual).TimestampFormat); } }