Example #1
0
        public static async Task ThenSolutionDetailExist(Table table)
        {
            var expectedSolutionDetails = table.CreateSet <SolutionDetailTable>().Select(m => new
            {
                m.Solution,
                AboutUrl             = string.IsNullOrWhiteSpace(m.AboutUrl) ? null : m.AboutUrl,
                Features             = string.IsNullOrWhiteSpace(m.Features) ? null : m.Features,
                Summary              = string.IsNullOrWhiteSpace(m.SummaryDescription) ? null : m.SummaryDescription,
                FullDescription      = string.IsNullOrWhiteSpace(m.FullDescription) ? null : m.FullDescription,
                ClientApplication    = string.IsNullOrWhiteSpace(m.ClientApplication) ? null : JToken.Parse(m.ClientApplication).ToString(),
                Hosting              = string.IsNullOrWhiteSpace(m.Hosting) ? null : JToken.Parse(m.Hosting).ToString(),
                RoadMap              = string.IsNullOrWhiteSpace(m.RoadMap) ? null : m.RoadMap,
                IntegrationsUrl      = string.IsNullOrWhiteSpace(m.IntegrationsUrl) ? null : m.IntegrationsUrl,
                ImplementationDetail = string.IsNullOrWhiteSpace(m.ImplementationDetail) ? null : m.ImplementationDetail,
            });

            var solutionDetails = await SolutionDetailEntity.FetchAllAsync();

            solutionDetails.Select(m => new
            {
                Solution = m.SolutionId,
                m.AboutUrl,
                m.Features,
                m.Summary,
                m.FullDescription,
                m.RoadMap,
                m.IntegrationsUrl,
                m.ImplementationDetail,
                ClientApplication = string.IsNullOrWhiteSpace(m.ClientApplication) ? null : JToken.Parse(m.ClientApplication).ToString(),
                Hosting           = string.IsNullOrWhiteSpace(m.Hosting) ? null : JToken.Parse(m.Hosting).ToString()
            }).Should().BeEquivalentTo(expectedSolutionDetails);
        }
        public static async Task ThenSolutionDetailExist(Table table)
        {
            var expectedSolutionDetails = table.CreateSet <SolutionDetailTable>().Select(m => new
            {
                m.Solution,
                AboutUrl          = string.IsNullOrWhiteSpace(m.AboutUrl) ? null : m.AboutUrl,
                Features          = string.IsNullOrWhiteSpace(m.Features) ? null : m.Features,
                Summary           = string.IsNullOrWhiteSpace(m.SummaryDescription) ? null : m.SummaryDescription,
                FullDescription   = string.IsNullOrWhiteSpace(m.FullDescription) ? null : m.FullDescription,
                ClientApplication = string.IsNullOrWhiteSpace(m.ClientApplication) ? null : JToken.Parse(m.ClientApplication).ToString()
            });
            var solutionDetails = await SolutionDetailEntity.FetchAllAsync().ConfigureAwait(false);

            solutionDetails.Select(m => new
            {
                Solution = m.SolutionId,
                m.AboutUrl,
                m.Features,
                m.Summary,
                m.FullDescription,
                ClientApplication = string.IsNullOrWhiteSpace(m.ClientApplication) ? null : JToken.Parse(m.ClientApplication).ToString()
            }).Should().BeEquivalentTo(expectedSolutionDetails);
        }
        public static async Task GivenASolutionDetailDoesNotExist(string solutionId)
        {
            var solutionDetailList = await SolutionDetailEntity.FetchAllAsync().ConfigureAwait(false);

            solutionDetailList.Select(x => x.SolutionId).Should().NotContain(solutionId);
        }