forked from WEC-Sim/WEC-Sim_Applications
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestMultipleConditionRuns.m
More file actions
74 lines (67 loc) · 2.09 KB
/
Copy pathTestMultipleConditionRuns.m
File metadata and controls
74 lines (67 loc) · 2.09 KB
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
classdef TestMultipleConditionRuns < matlab.unittest.TestCase
properties
OriginalDefault
testDir
h5Dir = '../_Common_Input_Files/RM3/hydroData/'
h5Name = 'rm3.h5'
outName = 'rm3.out'
end
methods (Access = 'public')
function obj = TestMultipleConditionRuns
obj.testDir = fileparts(mfilename('fullpath'));
end
end
methods (TestMethodSetup)
function killPlots (~)
set(0,'DefaultFigureVisible','off');
end
end
methods(TestClassSetup)
function captureVisibility(testCase)
testCase.OriginalDefault = get(0,'DefaultFigureVisible');
end
function runBemio(testCase)
cd(testCase.h5Dir);
if isfile(testCase.h5Name)
fprintf('runBemio skipped, *.h5 already exists\n')
else
bemio
end
cd(testCase.testDir)
end
end
methods(TestMethodTeardown)
function returnHome(testCase)
cd(testCase.testDir)
end
end
methods(TestClassTeardown)
function checkVisibilityRestored(testCase)
set(0,'DefaultFigureVisible',testCase.OriginalDefault);
testCase.assertEqual(get(0,'DefaultFigureVisible'), ...
testCase.OriginalDefault);
end
end
methods(Test)
function testRM3_MCROPT1(testCase)
cd RM3_MCROPT1
wecSimMCR
close_system('RM3',0)
end
function testRM3_MCROPT2(testCase)
cd RM3_MCROPT2
wecSimMCR
close_system('RM3',0)
end
function testRM3_MCROPT3(testCase)
cd RM3_MCROPT3
wecSimMCR
close_system('RM3',0)
end
function testRM3_MCROPT3_SeaState(testCase)
cd RM3_MCROPT3_SeaState
wecSimMCR
close_system('RM3',0)
end
end
end