Inheritance: ViewComponentBase, IEffectEnabled
Ejemplo n.º 1
0
        public DatePickerTests()
        {
            _httpContext = TestHelper.CreateMockedHttpContext();
            _viewContext = new ViewContext { HttpContext = _httpContext.Object, ViewData = new ViewDataDictionary() };

            _clientSideObjectWriterFactory = new Mock<IClientSideObjectWriterFactory>();

            _datePicker = new DatePicker(_viewContext, _clientSideObjectWriterFactory.Object) { AssetKey = jQueryViewComponentFactory.DefaultAssetKey };
        }
        public InputComponentExtensionsTests()
        {
            viewContext = TestHelper.CreateViewContext();
            datepicker = DatePickerTestHelper.CreateDatePicker(null, viewContext);
            datepicker.Name = "DatePicker1";

            result = new ValueProviderResult("s", "s", System.Threading.Thread.CurrentThread.CurrentCulture);
            state = new ModelState();
            state.Value = result;

            viewContext.ViewData.ModelState.Add("DatePicker1", state);
            currentCulture = CultureInfo.CurrentCulture;
        }
 public DatePickerHtmlBuilder(DatePicker datePicker)
 {
     Component = datePicker;
 }
 public DatePickerBuilderTests()
 {
     _datePicker = new DatePicker(new ViewContext(), new Mock<IClientSideObjectWriterFactory>().Object);
     _builder = new DatePickerBuilder(_datePicker);
 }
 public DatePickerHtmlBuilder(DatePicker datePicker)
 {
     DatePicker = datePicker;
 }