public void ShouldBuildWithoutDocumentFields()
        {
            var check = new SandboxSupplementaryDocTextDataCheckBuilder()
                        .WithBreakdown(_someBreakDown)
                        .WithRecommendation(_someRecommendation)
                        .Build();

            var sandboxTextDataCheckResult = (SandboxSupplementaryDocTextDataCheckResult)check.Result;

            Assert.Null(sandboxTextDataCheckResult.DocumentFields);
        }
        public void ShouldBuildWithDocumentField()
        {
            var check = new SandboxSupplementaryDocTextDataCheckBuilder()
                        .WithDocumentField(_someKey, _someValue)
                        .WithBreakdown(_someBreakDown)
                        .WithRecommendation(_someRecommendation)
                        .Build();

            var sandboxTextDataCheckResult = (SandboxSupplementaryDocTextDataCheckResult)check.Result;

            var result = sandboxTextDataCheckResult.DocumentFields.Single();

            Assert.Equal(_someKey, result.Key);
            Assert.Equal(_someValue, result.Value);
        }
        public void WithDocumentFieldsShouldOverrideWithDocumentField()
        {
            var documentFields = new Dictionary <string, object>
            {
                { _someKey, _someValue },
                { "key2", _someValue }
            };

            var check = new SandboxSupplementaryDocTextDataCheckBuilder()
                        .WithDocumentField(_someKey, _someValue)
                        .WithDocumentFields(documentFields)
                        .WithRecommendation(_someRecommendation)
                        .WithBreakdown(_someBreakDown)
                        .Build();

            var sandboxTextDataCheckResult = (SandboxSupplementaryDocTextDataCheckResult)check.Result;

            Assert.Equal(2, sandboxTextDataCheckResult.DocumentFields.Count);
        }
        public void ShouldBuildWithDocumentFields()
        {
            var documentFields = new Dictionary <string, object>
            {
                { _someKey, _someValue },
                { "key2", "value2" }
            };

            var check = new SandboxSupplementaryDocTextDataCheckBuilder()
                        .WithDocumentFields(documentFields)
                        .WithRecommendation(_someRecommendation)
                        .WithBreakdown(_someBreakDown)
                        .Build();

            var sandboxTextDataCheckResult = (SandboxSupplementaryDocTextDataCheckResult)check.Result;

            var result = sandboxTextDataCheckResult.DocumentFields;

            Assert.Equal(2, result.Count);
            Assert.Equal(_someKey, result.ElementAt(0).Key);
            Assert.Equal(_someValue, result.ElementAt(0).Value);
            Assert.Equal("key2", result.ElementAt(1).Key);
            Assert.Equal("value2", result.ElementAt(1).Value);
        }