Skip to content

Commit

Permalink
Merge pull request #14 from european-central-bank/frequency
Browse files Browse the repository at this point in the history
Frequency fixes
  • Loading branch information
ebenetce authored Nov 25, 2021
2 parents 71de4c0 + bc01a8a commit 87986a5
Show file tree
Hide file tree
Showing 11 changed files with 62 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info>
<Category UUID="FileClassCategory">
<Label UUID="test" />
</Category>
</Info>
Binary file modified tbx/app/BEARapp.mlappinstall
Binary file not shown.
2 changes: 1 addition & 1 deletion tbx/app/BEARapp.prj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<deployment-project plugin="plugin.apptool" plugin-version="1.0">
<configuration build-checksum="267656668" file="C:\Users\ebenetce\MATLAB\BEAR-toolbox\tbx\app\BEARapp.prj" location="C:\Users\ebenetce\MATLAB\BEAR-toolbox\tbx\app" name="BEARapp" target="target.mlapps" target-name="Package App">
<configuration build-checksum="2771206578" file="C:\Users\ebenetce\MATLAB\BEAR-toolbox\tbx\app\BEARapp.prj" location="C:\Users\ebenetce\MATLAB\BEAR-toolbox\tbx\app" name="BEARapp" target="target.mlapps" target-name="Package App">
<param.appname>BEARapp</param.appname>
<param.authnamewatermark>Alistair Dieppe and Björn van Roye</param.authnamewatermark>
<param.email>alistair.dieppe@ecb.europa.eu</param.email>
Expand Down
Binary file modified tbx/app/BEARapp20a.mlapp
Binary file not shown.
Binary file modified tbx/app/BEARapp21a.mlapp
Binary file not shown.
3 changes: 2 additions & 1 deletion tests/runQuickTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
suite4 = TestSuite.fromFile('tUtils.m');
suite5 = TestSuite.fromFile('tFAVAR.m');
suite6 = TestSuite.fromFile('tNewInterface.m');
suite = [suite1, suite2, suite3, suite4, suite5, suite6];
suite7 = TestSuite.fromFile('tApp.m');
suite = [suite1, suite2, suite3, suite4, suite5, suite7];

runner = TestRunner.withTextOutput;
runner.addPlugin(CodeCoveragePlugin.forFolder(bearroot(), 'IncludingSubfolders', true))
Expand Down
49 changes: 49 additions & 0 deletions tests/tApp.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
classdef tApp < matlab.uitest.TestCase

properties
App
end

methods (TestMethodSetup)

function loadApp(tc)
tc.App = BEARapp20a();
addTeardown(tc, @() delete(tc.App));
end

end

methods (Test)

function tFrequency(tc)

tc.choose(tc.App.frequency_cp, 'monthly');
tc.press(tc.App.QuickExporttoWorkspaceButton)
opts = evalin('base', 'opts');
tc.verifyEqual(opts.frequency, 3);

tc.choose(tc.App.frequency_cp, 'quarterly');
tc.press(tc.App.QuickExporttoWorkspaceButton)
opts = evalin('base', 'opts');
tc.verifyEqual(opts.frequency, 2);

tc.choose(tc.App.frequency_cp, 'yearly');
tc.press(tc.App.QuickExporttoWorkspaceButton)
opts = evalin('base', 'opts');
tc.verifyEqual(opts.frequency, 1);

tc.choose(tc.App.frequency_cp, 'weekly');
tc.press(tc.App.QuickExporttoWorkspaceButton)
opts = evalin('base', 'opts');
tc.verifyEqual(opts.frequency, 4);

tc.choose(tc.App.frequency_cp, 'daily');
tc.press(tc.App.QuickExporttoWorkspaceButton)
opts = evalin('base', 'opts');
tc.verifyEqual(opts.frequency, 5);

end

end

end
2 changes: 1 addition & 1 deletion tests/tFAVAR.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
classdef tFAVAR < matlab.unittest.TestCase

methods(Test)
methods(Test, TestTags = {'Git'})

function tNonFavar(tc)
s = BEARsettings(7, 'ExcelFile', 'data.xlsx');
Expand Down
2 changes: 1 addition & 1 deletion tests/tPanelSettings.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
classdef tPanelSettings < matlab.unittest.TestCase


methods (Test)
methods (Test, TestTags = {'Git'})
function tPanelIRFt56(tc)
opts = BEARsettings(4, 'ExcelFile', 'data.xlsx');

Expand Down
2 changes: 1 addition & 1 deletion tests/tSettings.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
classdef tSettings < matlab.unittest.TestCase

methods(Test)
methods(Test, TestTags = {'Git'})

function tDefaults(tc)
s = BEARsettings(1);
Expand Down
2 changes: 1 addition & 1 deletion tests/tUtils.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
classdef tUtils < matlab.unittest.TestCase

methods(Test)
methods(Test, TestTags = {'Git'})

function tfixstring(tc)
str = ' a s dsds sd asrt as 2893 ~@ ';
Expand Down

0 comments on commit 87986a5

Please sign in to comment.