public void ShouldBuildWithBreakdown() { string someSubCheck = "someSubCheck"; string someResult = "someResult"; string someName = "someName"; string someValue = "someValue"; List <SandboxDetail> someSandboxDetails = new List <SandboxDetail> { new SandboxDetail(someName, someValue) }; var breakdown = new SandboxBreakdown(someSubCheck, someResult, someSandboxDetails); var check = new SandboxZoomLivenessCheckBuilder() .WithBreakdown(breakdown) .WithRecommendation(_someRecommendation) .Build(); var result = check.Result.Report.Breakdown.Single(); Assert.Equal(someName, result.Details.Single().Name); Assert.Equal(someValue, result.Details.Single().Value); Assert.Equal(someSubCheck, result.SubCheck); Assert.Equal(someResult, result.Result); }
public void ShouldBuildWithBreakdowns() { string someSubCheck = "someSubCheck"; string someResult = "someResult"; string someName = "someName"; string someValue = "someValue"; List <SandboxDetail> someSandboxDetails = new List <SandboxDetail> { new SandboxDetail(someName, someValue) }; var breakdown = new SandboxBreakdown(someSubCheck, someResult, someSandboxDetails); var breakdownList = new List <SandboxBreakdown> { breakdown, breakdown }; var check = new SandboxZoomLivenessCheckBuilder() .WithBreakdowns(breakdownList) .WithRecommendation(_someRecommendation) .Build(); Assert.Equal(2, check.Result.Report.Breakdown.Count); }
public TBuilder WithBreakdown(SandboxBreakdown breakdown) { Breakdown.Add(breakdown); return((TBuilder)this); }