private BallotStatus GetTestBallotStatus() { var status = new BallotStatus { TrackingId = "track id 1", ApproximateCastTime = DateTime.Parse("1/1/2001"), Details = new List <string> { "Counted" }, Location = "location 1", Status = BallotCountStatus.Counted }; return(status); }
public static BallotStatusEntity ToBallotStatusEntity(this BallotStatus status) { if (status is null) { return(null); } var rowKey = status.ToBallotStatusRowKey(); return(new BallotStatusEntity { RowKey = rowKey, PartitionKey = rowKey.ToBallotStatusPartitionKey(), TrackingId = status.TrackingId, ApproximateCastTime = status.ApproximateCastTime, Location = status.Location }); }
public static string ToBallotStatusRowKey(this BallotStatus ballotStatus) { return(ballotStatus?.TrackingId.ToBallotStatusKeyFormat()); }
public Ballot(IEnumerable <BallotField> fields) { id = Guid.NewGuid().ToString(); _fields = fields; status = BallotStatus.untouched; }
public void ToBallotStatusRowKey_NullBallotStatus() { BallotStatus status = null; Assert.IsNull(status.ToBallotStatusRowKey()); }
public void ToBallotStatusEntity_NullBallotStatus() { BallotStatus status = null; Assert.IsNull(status.ToBallotStatusEntity()); }