-
Notifications
You must be signed in to change notification settings - Fork 165
Expand file tree
/
Copy pathtestfig2plotlyargs.m
More file actions
42 lines (37 loc) · 1.21 KB
/
testfig2plotlyargs.m
File metadata and controls
42 lines (37 loc) · 1.21 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
classdef testfig2plotlyargs < matlab.unittest.TestCase
%test fig2plotly args
methods (Test)
%test changing name using 'name' property
function testNamePlot(testCase)
close all
f = figure;
plot(1:10);
name = 'test_name';
resp = fig2plotly(f,'name',name);
actual= resp.filename;
expected = name;
testCase.verifyEqual(actual,expected);
end
%test changing name using 'filename' property
function testFileNamePlot(testCase)
close all
f = figure;
plot(1:10);
filename = 'test_name';
resp = fig2plotly(f,'filename',filename);
actual= resp.filename;
expected = filename;
testCase.verifyEqual(actual,expected);
end
%test no change to name
function testNoNamePlot(testCase)
close all
f = figure;
plot(1:10);
resp = fig2plotly(f);
actual= resp.filename(1:length('untitled'));
expected = 'untitled';
testCase.verifyEqual(actual,expected);
end
end
end