Example #1
0
        private string GetStatus()
        {
            if (AvailabilityLogs is null)
            {
                return("ST_OK");
            }

            if (AvailabilityLogs.Any() == false)
            {
                return("ST_OK");
            }

            var newestRecord = AvailabilityLogs
                               .OrderByDescending(e => e.CreatedAt)
                               .First();

            if (newestRecord.Body != ExpectedResponse || newestRecord.StatusCode != ExpectedStatusCode)
            {
                return("ST_ERROR");
            }

            return("ST_OK");
        }