private void AssertValidCandidateInformation(CandidateInformation candidateInformation) { Assert(candidateInformation != null, "Candidate not found."); if (candidateInformation == null) { return; // Just to avoid IDE warning. } Assert(candidateInformation.IsCurrentCandidate, "Candidate quited election."); }
private void AssertValidCandidateInformation(CandidateInformation candidateInformation) { Assert(candidateInformation != null, "Candidate not found."); // ReSharper disable once PossibleNullReferenceException Assert(candidateInformation.IsCurrentCandidate, "Candidate quited election."); }