-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathTestUtils.prg
112 lines (66 loc) · 3.15 KB
/
TestUtils.prg
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
//-- copyright
// hbunit is a unit-testing framework for the Harbour language.
//
// Copyright (C) 2019 Manuel Calero Solis <manuelcalerosolis _at_ gmail _dot_ com>
//
// Based on hbunit from Enderson maia <endersonmaia _at_ gmail _dot_ com>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// See COPYRIGHT for more details.
//++
#include "hbunit.ch"
//---------------------------------------------------------------------------//
FUNCTION testWaitSeconds( nSecs )
if( hb_isnil( nSecs ), nSecs := 0.1, )
waitSeconds( nSecs )
RETURN ( sysrefresh() )
//---------------------------------------------------------------------------//
FUNCTION testGetControl( nId, oDialog )
local nPos
if empty( oDialog )
RETURN ( nil )
end if
nPos := ascan( oDialog:aControls, { | o | o:nId == nId } )
if nPos == 0
RETURN ( nil )
end if
RETURN ( oDialog:aControls[ nPos ] )
//---------------------------------------------------------------------------//
USER FUNCTION hbunit_test()
local oSuite := TestSuite():New()
local oRunner := TextTextRunner():New()
oSuite:addTest( TestEmpresasController():New() )
oSuite:addTest( TestArticulosController():New() )
oSuite:addTest( TestConfiguracionVistasController():New() )
oSuite:addTest( TestCaracteristicasController():New() )
oSuite:addTest( TestCaracteristicasLineasController():New() )
oSuite:addTest( TestCaracteristicasValoresArticulosController():New() )
oSuite:addTest( TestUnidadesMedicionController():New() )
oSuite:addTest( TestUnidadesMedicionGruposController():New() )
oSuite:addTest( TestArticulosTarifasController():New() )
oSuite:addTest( TestArticulosTarifasController():New() )
oSuite:addTest( TestAlmacenesController():New() )
oSuite:addTest( TestTercerosController():New() )
oSuite:addTest( TestTercerosGruposController():New() )
oSuite:addTest( TestEntidadesController():New() )
oSuite:addTest( TestFacturasClientesFacturaeController():New() )
oSuite:addTest( TestPagosController():New() )
oSuite:addTest( TestPagosAssistantController():New() )
oSuite:addTest( TestAlbaranesComprasController():New() )
oSuite:addTest( TestAlbaranesVentasController():New() )
oSuite:addTest( TestFacturasVentasController():New() )
oSuite:addTest( TestConsolidacionAlmacenController():New() )
oSuite:addTest( TestMovimientoAlmacenController():New() )
oSuite:addTest( TestStocksRepository():New() )
oSuite:addTest( TestConversorGenericoController():New() )
oSuite:addTest( TestConversorToFacturaComprasController():New() )
oSuite:addTest( TestConversorToFacturaVentasController():New() )
// oSuite:setCategories( { "terceros_grupos" } )
oRunner:run( oSuite )
oSuite:End()
RETURN ( nil )
//---------------------------------------------------------------------------//