/*
 * Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET)
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

package ch.ethz.seb.sebserver.gui.form;

import org.junit.Test;

public class FormBuilderTest {

    @Test
    public void testFormBuilder() {

//        final PolyglotPageService polyglotPageService = Mockito.mock(PolyglotPageService.class);
//        final ServerPushService serverPushService = Mockito.mock(ServerPushService.class);
//        final WidgetFactory WidgetFactory = new WidgetFactory(polyglotPageService, serverPushService);
//
//        final PageFormService pageFormService = new PageFormService(
//                new JSONMapper(),
//                WidgetFactory,
//                polyglotPageService);
//
//        final PageContext formContext = Mockito.mock(PageContext.class);
//        final SaveInstitution rest = Mockito.mock(SaveInstitution.class);
//
//        final Composite content = Mockito.mock(Composite.class);
//
//        final FormHandle<Institution> formHandle = pageFormService.getBuilder(
//                formContext.copyOf(content), 4)
//                .readonly(formContext.isReadonly())
//                .putStaticValue(Domain.INSTITUTION.ATTR_ID, "1")
//                .addField(FormBuilder.text(
//                        Domain.INSTITUTION.ATTR_NAME,
//                        "sebserver.institution.form.name",
//                        "Test Institution"))
//                .addField(FormBuilder.text(
//                        Domain.INSTITUTION.ATTR_URL_SUFFIX,
//                        "sebserver.institution.form.urlSuffix",
//                        "inst"))
//                .addField(FormBuilder.imageUpload(
//                        Domain.INSTITUTION.ATTR_LOGO_IMAGE,
//                        "sebserver.institution.form.logoImage",
//                        ""))
//                .buildFor(rest);
//
//        assertNotNull(formHandle);
    }

}
