コード例 #1
0
        public void ShoulShowWeaknessesIfWeaknessesSet()
        {
            var providerDetails = new WhatEmployersAreSaying();

            var html = providerDetails.RenderAsHtml(_providerFeedback).ToAngleSharp();

            GetHtmlElement(html, "#weaknesses").GetElementsByTagName("li").First().InnerHtml.Should().Contain("Weaknesss (4)");
        }
コード例 #2
0
        public void ShoulShowStrengthsIfStrengthsSet()
        {
            var providerDetails = new WhatEmployersAreSaying();

            var html = providerDetails.RenderAsHtml(_providerFeedback).ToAngleSharp();

            GetHtmlElement(html, "#strengths").GetElementsByTagName("li").First().InnerHtml.Should().Be("Strength (6)");
        }
コード例 #3
0
        public void ShoulNotShowFeedbackIfNotSet()
        {
            var providerDetails = new WhatEmployersAreSaying();

            var html = providerDetails.RenderAsHtml(null).ToAngleSharp();

            GetPartial(html, "#feedback-heading").Should().Be(string.Empty);
        }
コード例 #4
0
        public void ShoulNotShowStrengthsIfNoStrengthsSet()
        {
            var providerDetails = new WhatEmployersAreSaying();

            _providerFeedback.Strengths.Clear();

            var html = providerDetails.RenderAsHtml(_providerFeedback).ToAngleSharp();

            GetPartial(html, "#strengths").Should().NotContain("Strengths");
        }
コード例 #5
0
        public void ShouldShowFeedbackRatingsIfFeedbackSet()
        {
            var providerDetails = new WhatEmployersAreSaying();

            var html = providerDetails.RenderAsHtml(_providerFeedback).ToAngleSharp();

            GetPartial(html, "#feedback-heading").Should().Contain("Based on 34 reviews");
            GetPartial(html, "#strengths").Should().Contain("Strengths");
            GetPartial(html, "#weaknesses").Should().Contain("Things to improve");
        }
コード例 #6
0
        public void ShoulNotShowWeaknessesIfNoWeaknessesSet()
        {
            var providerDetails  = new WhatEmployersAreSaying();
            var providerFeedback = GetProviderFeedback();

            providerFeedback.Weaknesses.Clear();

            var html = providerDetails.RenderAsHtml(providerFeedback).ToAngleSharp();

            GetPartial(html, "#weaknesses").Should().NotContain("Things to improve");
        }