private void AssertDate(XmlNode container, BocDateTimeValueRenderer renderer)
        {
            var dateInputWrapper = container.GetAssertedChildElement("span", 0);

            if (!_control.IsReadOnly)
            {
                dateInputWrapper.AssertAttributeValueContains("class", renderer.CssClassDateInputWrapper);
                dateInputWrapper.AssertAttributeValueContains(
                    "class", renderer.GetPositioningCssClass(_renderingContext, BocDateTimeValueRenderer.DateTimeValuePart.Date));
                dateInputWrapper.AssertChildElementCount(0);

                dateInputWrapper.AssertTextNode("TextBox", 0);
                Assert.That(_dateTextBox.ID, Is.EqualTo(c_dateValueName));
                Assert.That(_dateTextBox.CssClass, Is.EqualTo(renderer.CssClassDate));
                Assert.That(_dateTextBox.Text, Is.EqualTo(c_dateString));
                Assert.That(_dateTextBox.MaxLength, Is.EqualTo(10));
            }
            else
            {
                dateInputWrapper.AssertAttributeValueEquals("data-value", _dateValue.ToString("yyyy-MM-dd"));
            }
        }
        private void AssertTime(XmlNode container, BocDateTimeValueRenderer renderer)
        {
            if (!_control.IsReadOnly)
            {
                var timeInputWrapper = container.GetAssertedChildElement("span", 2);
                timeInputWrapper.AssertAttributeValueContains("class", renderer.CssClassTimeInputWrapper);
                timeInputWrapper.AssertAttributeValueContains(
                    "class", renderer.GetPositioningCssClass(_renderingContext, BocDateTimeValueRenderer.DateTimeValuePart.Time));
                timeInputWrapper.AssertChildElementCount(0);
                timeInputWrapper.AssertTextNode("TextBox", 0);

                Assert.That(_timeTextBox.ID, Is.EqualTo(c_timeValueName));
                Assert.That(_timeTextBox.CssClass, Is.EqualTo(renderer.CssClassTime));
                Assert.That(_timeTextBox.Text, Is.EqualTo(c_timeString));
                Assert.That(_timeTextBox.MaxLength, Is.EqualTo(5));
            }
            else
            {
                var dateLabel = container.GetAssertedChildElement("span", 0);
                dateLabel.AssertAttributeValueEquals("data-value", c_formatedDateString);
                var timeLabel = container.GetAssertedChildElement("span", 1);
                timeLabel.AssertAttributeValueEquals("data-value", c_formatedTimeString);
            }
        }