Subversion Repositories eFlore/Applications.del

Rev

Rev 275 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 275 Rev 307
Line 1... Line 1...
1
package org.tela_botanica.del.test.vues.plateformedetermination.vote.barrerepartition;
1
package org.tela_botanica.del.test.vues.plateformedetermination.vote.barrerepartition;
Line 2... Line 2...
2
 
2
 
-
 
3
import static org.junit.Assert.*;
Line 3... Line 4...
3
import static org.junit.Assert.*;
4
import static org.mockito.Mockito.mock;
Line 4... Line 5...
4
 
5
 
5
import java.util.Date;
6
import java.util.Date;
-
 
7
 
6
 
8
import org.junit.Before;
7
import org.junit.Before;
9
import org.junit.Test;
8
import org.junit.Test;
10
import org.mockito.Mock;
9
import org.tela_botanica.del.client.modeles.MoyenneVote;
11
import org.tela_botanica.del.client.modeles.MoyenneVote;
10
import org.tela_botanica.del.client.modeles.PropositionDetermination;
12
import org.tela_botanica.del.client.modeles.PropositionDetermination;
Line 21... Line 23...
21
import com.google.gwt.user.client.ui.Widget;
23
import com.google.gwt.user.client.ui.Widget;
Line 22... Line 24...
22
 
24
 
Line 23... Line 25...
23
public class BarreRepartitionVotePresenteurTest {
25
public class BarreRepartitionVotePresenteurTest {
-
 
26
 
Line 24... Line 27...
24
 
27
	private BarreRepartitionVotePresenteur barreRepartitionVotePresenteur;
25
	private BarreRepartitionVotePresenteur barreRepartitionVotePresenteur;
28
	private BarreRepartitionVotePresenteur.Vue vue;
Line 26... Line -...
26
	
-
 
27
	@Before
29
	
28
	public void setUp() {
-
 
29
		
-
 
30
		//TODO: utiliser un objet mock genre EasyMock ou bien JMock
-
 
31
		Vue vueVide = new Vue() {
-
 
32
			
-
 
33
			@Override
-
 
34
			public Widget asWidget() {
-
 
35
				// TODO Auto-generated method stub
-
 
36
				return null;
-
 
37
			}
-
 
38
			
-
 
39
			@Override
-
 
40
			public void setVoteOuiEffectue() {
-
 
41
				// TODO Auto-generated method stub	
-
 
42
			}
-
 
43
			
-
 
44
			@Override
-
 
45
			public void setVoteNonEffectue() {
-
 
46
				// TODO Auto-generated method stub	
-
 
47
			}
-
 
48
			
-
 
49
			@Override
-
 
50
			public HasClickHandlers getBoutonOui() {
-
 
51
				// TODO Auto-generated method stub
-
 
52
				return new HasClickHandlers() {
-
 
53
					
-
 
54
					@Override
-
 
55
					public void fireEvent(GwtEvent<?> event) {
-
 
56
						// TODO Auto-generated method stub
-
 
57
						
-
 
58
					}
-
 
59
					
-
 
60
					@Override
-
 
61
					public HandlerRegistration addClickHandler(ClickHandler handler) {
-
 
62
						// TODO Auto-generated method stub
-
 
63
						return null;
-
 
64
					}
-
 
65
				};
-
 
66
			}
-
 
67
			
-
 
68
			@Override
-
 
69
			public HasClickHandlers getBoutonNon() {
-
 
70
				// TODO Auto-generated method stub
-
 
71
				return new HasClickHandlers() {
-
 
72
					
-
 
73
					@Override
-
 
74
					public void fireEvent(GwtEvent<?> event) {
-
 
75
						// TODO Auto-generated method stub
-
 
76
						
-
 
77
					}
-
 
78
					
-
 
79
					@Override
-
 
80
					public HandlerRegistration addClickHandler(ClickHandler handler) {
-
 
81
						// TODO Auto-generated method stub
-
 
82
						return null;
-
 
83
					}
-
 
84
				};
-
 
85
			}
-
 
86
			
-
 
87
			@Override
-
 
88
			public IsWidget getBarreRepartitionHtmlBrut() {
-
 
89
				// TODO Auto-generated method stub
-
 
90
				return null;
-
 
91
			}
-
 
92
			
-
 
93
			@Override
-
 
94
			public void afficherVotes(int pourcentage, String NomTaxon) {
30
	@Before
Line 95... Line 31...
95
				// TODO Auto-generated method stub	
31
	public void setUp() {
96
			}
32
		
97
		};
33
		vue = mock(Vue.class);
98
		barreRepartitionVotePresenteur = new BarreRepartitionVotePresenteur(vueVide);
34
		barreRepartitionVotePresenteur = new BarreRepartitionVotePresenteur(vue);