Skip to content

Commit

Permalink
fix: yet another unit test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Anisimov committed Dec 17, 2020
1 parent 92f993d commit dda1b6e
Showing 1 changed file with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,15 @@
package com.vaadin.flow.component.dnd;

import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Properties;

import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;

import com.vaadin.flow.component.Component;
import com.vaadin.flow.component.dnd.internal.DnDUtilHelper;
import com.vaadin.flow.component.internal.DependencyList;
Expand All @@ -30,11 +36,8 @@
import com.vaadin.flow.server.VaadinService;
import com.vaadin.flow.server.VaadinServlet;
import com.vaadin.flow.server.VaadinSession;
import com.vaadin.flow.server.startup.ApplicationConfiguration;
import com.vaadin.flow.shared.ui.Dependency;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;

public abstract class AbstractDnDUnitTest {

Expand All @@ -43,8 +46,12 @@ public abstract class AbstractDnDUnitTest {

@Before
public void setup() {
ApplicationConfiguration appConfig = Mockito
.mock(ApplicationConfiguration.class);
Mockito.when(appConfig.getPropertyNames())
.thenReturn(Collections.emptyEnumeration());
DefaultDeploymentConfiguration configuration = new DefaultDeploymentConfiguration(
VaadinServlet.class, new Properties());
appConfig, VaadinServlet.class, new Properties());

VaadinService service = Mockito.mock(VaadinService.class);
Mockito.when(service.resolveResource(Mockito.anyString()))
Expand Down

0 comments on commit dda1b6e

Please sign in to comment.