public void ShoulShowWeaknessesIfWeaknessesSet() { var providerDetails = new WhatEmployersAreSaying(); var html = providerDetails.RenderAsHtml(_providerFeedback).ToAngleSharp(); GetHtmlElement(html, "#weaknesses").GetElementsByTagName("li").First().InnerHtml.Should().Contain("Weaknesss (4)"); }
public void ShoulShowStrengthsIfStrengthsSet() { var providerDetails = new WhatEmployersAreSaying(); var html = providerDetails.RenderAsHtml(_providerFeedback).ToAngleSharp(); GetHtmlElement(html, "#strengths").GetElementsByTagName("li").First().InnerHtml.Should().Be("Strength (6)"); }
public void ShoulNotShowFeedbackIfNotSet() { var providerDetails = new WhatEmployersAreSaying(); var html = providerDetails.RenderAsHtml(null).ToAngleSharp(); GetPartial(html, "#feedback-heading").Should().Be(string.Empty); }
public void ShoulNotShowStrengthsIfNoStrengthsSet() { var providerDetails = new WhatEmployersAreSaying(); _providerFeedback.Strengths.Clear(); var html = providerDetails.RenderAsHtml(_providerFeedback).ToAngleSharp(); GetPartial(html, "#strengths").Should().NotContain("Strengths"); }
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"); }
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"); }