-
Notifications
You must be signed in to change notification settings - Fork 0
/
DialogDetailCompositeTest.xtend
51 lines (42 loc) · 1.79 KB
/
DialogDetailCompositeTest.xtend
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*******************************************************************************
* Copyright (c) 2016 RCP Vision (http://www.rcp-vision.com) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Lorenzo Bettini - Initial contribution and API
*******************************************************************************/
package org.eclipse.emf.parsley.tests
import com.google.inject.Inject
import org.eclipse.emf.edit.domain.EditingDomain
import org.eclipse.emf.parsley.composite.DialogDetailComposite
import org.eclipse.emf.parsley.junit4.AbstractEmfParsleyControlBasedTest
import org.eclipse.emf.parsley.tests.util.EmfParsleyFixturesAndUtilitiesTestRule
import org.eclipse.swt.SWT
import org.junit.Before
import org.junit.Rule
import org.junit.Test
/**
* @author Lorenzo Bettini
*/
class DialogDetailCompositeTest extends AbstractEmfParsleyControlBasedTest {
@Rule public extension EmfParsleyFixturesAndUtilitiesTestRule fixtures = new EmfParsleyFixturesAndUtilitiesTestRule()
@Inject EditingDomain editingDomain
var DialogDetailComposite dialogDetailComposite
@Before def void setupTestCase() {
val injector = getOrCreateInjector
injector.injectMembers(this)
dialogDetailComposite = new DialogDetailComposite(shell, SWT.NONE)
injector.injectMembers(dialogDetailComposite)
}
@Test def void testInitWithEditingDomain() {
val o = testFactory.createClassWithName => [name = "Test"]
dialogDetailComposite.init(o, editingDomain)
}
@Test def void testInitWithoutEditingDomain() {
val o = testFactory.createClassWithName => [name = "Test"]
dialogDetailComposite.init(o)
}
}