Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1c787d8

Browse files
committed
Added constants for status. Switch tab depending on status
1 parent7424aae commit1c787d8

File tree

3 files changed

+45
-18
lines changed

3 files changed

+45
-18
lines changed

‎PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/TestResult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ internal class Expectation
3030
internalExpectation(stringmessage,stringcaller)
3131
{
3232
this.Message=message;
33-
this.Caller=caller;
33+
this.Caller=caller.Replace("s*","\n");
3434
}
3535
publicstringMessage{get;set;}
3636
publicstringCaller{get;set;}

‎PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/TestRunnerWindow.Designer.cs

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/TestRunnerWindow.cs

Lines changed: 40 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,24 @@ public partial class TestRunnerWindow : Form
1717

1818
privateconstintIconSize=24;
1919
privateconstintSteps=1000;
20+
privateconststringStatusSuccess="Success";
21+
privateconststringStatusFailure="Failure";
22+
privateconststringStatusError="Error";
23+
privateconststringStatusDisabled="Disabled";
24+
privateconststringStatusWarning="Warning";
2025

21-
privatereadonlyRealTimeTestRunnertestRunner;
2226
privatereadonlyobjectpluginIntegration;
2327
privatereadonlystringusername;
2428
privatereadonlystringpassword;
2529
privatereadonlystringdatabase;
2630
privatereadonlystringconnectAs;
2731

2832
privatereadonlyList<TestResult>testResults=newList<TestResult>();
33+
2934
privateBindingListView<TestResult>viewTestResults;
3035

36+
privateRealTimeTestRunnertestRunner;
37+
3138
privateinttotalNumberOfTests;
3239
privateintrowIndexOnRightClick;
3340
privateintcompletedTests;
@@ -40,9 +47,6 @@ public TestRunnerWindow(object pluginIntegration, string username, string passwo
4047
this.database=database;
4148
this.connectAs=connectAs;
4249

43-
testRunner=newRealTimeTestRunner();
44-
testRunner.Connect(username,password,database);
45-
4650
InitializeComponent();
4751
}
4852

@@ -67,6 +71,9 @@ public async Task RunTestsAsync(string type, string owner, string name, string p
6771

6872
SetWindowTitle(type,owner,name,procedure);
6973

74+
testRunner=newRealTimeTestRunner();
75+
testRunner.Connect(username,password,database);
76+
7077
try
7178
{
7279
testRunner.GetVersion();
@@ -339,27 +346,27 @@ private void UpdateTestResult(@event @event)
339346
if(counter.disabled>0)
340347
{
341348
testResult.Icon=IconChar.Ban.ToBitmap(Color.Gray,IconSize);
342-
testResult.Status="Disabled";
349+
testResult.Status=StatusDisabled;
343350
}
344351
elseif(counter.success>0)
345352
{
346353
testResult.Icon=IconChar.Check.ToBitmap(Color.Green,IconSize);
347-
testResult.Status="Success";
354+
testResult.Status=StatusSuccess;
348355
}
349356
elseif(counter.failure>0)
350357
{
351358
testResult.Icon=IconChar.TimesCircle.ToBitmap(IconFont.Solid,IconSize,Color.Orange);
352-
testResult.Status="Failure";
359+
testResult.Status=StatusFailure;
353360
}
354361
elseif(counter.error>0)
355362
{
356363
testResult.Icon=IconChar.ExclamationCircle.ToBitmap(Color.Red,IconSize);
357-
testResult.Status="Error";
364+
testResult.Status=StatusError;
358365
}
359366
elseif(counter.warning>0)
360367
{
361368
testResult.Icon=IconChar.ExclamationTriangle.ToBitmap(Color.Orange,IconSize);
362-
testResult.Status="Warning";
369+
testResult.Status=StatusWarning;
363370
}
364371

365372
if(@event.test.errorStack!=null)
@@ -458,19 +465,19 @@ private void FilterTestResults()
458465
{
459466
if(testResult.Status!=null)
460467
{
461-
if(!cbSuccess.Checked&&testResult.Status.Equals("Success"))
468+
if(!cbSuccess.Checked&&testResult.Status.Equals(StatusSuccess))
462469
{
463470
returnfalse;
464471
}
465-
if(!cbFailure.Checked&&testResult.Status.Equals("Failure"))
472+
if(!cbFailure.Checked&&testResult.Status.Equals(StatusFailure))
466473
{
467474
returnfalse;
468475
}
469-
if(!cbError.Checked&&testResult.Status.Equals("Error"))
476+
if(!cbError.Checked&&testResult.Status.Equals(StatusError))
470477
{
471478
returnfalse;
472479
}
473-
if(!cbDisabled.Checked&&testResult.Status.Equals("Disabled"))
480+
if(!cbDisabled.Checked&&testResult.Status.Equals(StatusDisabled))
474481
{
475482
returnfalse;
476483
}
@@ -536,6 +543,26 @@ private void gridResults_SelectionChanged(object sender, EventArgs e)
536543

537544
gridTestFailures.Columns[0].MinimumWidth=480;
538545
gridTestFailures.Columns[1].MinimumWidth=480;
546+
547+
if(!Running)
548+
{
549+
if(testResult.Status==null)
550+
{
551+
tabs.SelectedTab=tabTest;
552+
}
553+
elseif(testResult.Status.Equals(StatusFailure))
554+
{
555+
tabs.SelectedTab=tabFailures;
556+
}
557+
elseif(testResult.Status.Equals(StatusError))
558+
{
559+
tabs.SelectedTab=tabErrors;
560+
}
561+
else
562+
{
563+
tabs.SelectedTab=tabTest;
564+
}
565+
}
539566
}
540567
}
541568

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp