Exemple #1
0
        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
            });
        }
Exemple #2
0
        public void ToBallotStatusRowKey_NullBallotStatus()
        {
            BallotStatus status = null;

            Assert.IsNull(status.ToBallotStatusRowKey());
        }