Skip to content

Commit d46e6e2

Browse files
fixing schedule test
1 parent 02bb2d1 commit d46e6e2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationScheduledRunbookTest.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,14 @@ public void GetAzureAutomationScheduledRunbookByrunbookNameAndScheduleNameSucces
8787
}
8888

8989
[TestMethod]
90-
[Ignore]
9190
public void GetAzureAutomationScheduledRunbookByRunbookNameSuccessfull()
9291
{
9392
// Setup
9493
string accountName = "automation";
9594
string runbookName = "runbook";
95+
string nextLink = string.Empty;
9696

97-
this.mockAutomationClient.Setup(f => f.ListJobSchedulesByRunbookName(accountName, runbookName)).Returns((string a, string b) => new List<JobSchedule>());
97+
this.mockAutomationClient.Setup(f => f.ListJobSchedules(accountName, ref nextLink)).Returns((string a, string b) => new List<JobSchedule>());
9898

9999
// Test
100100
this.cmdlet.AutomationAccountName = accountName;
@@ -103,18 +103,18 @@ public void GetAzureAutomationScheduledRunbookByRunbookNameSuccessfull()
103103
this.cmdlet.ExecuteCmdlet();
104104

105105
// Assert
106-
this.mockAutomationClient.Verify(f => f.ListJobSchedulesByRunbookName(accountName, runbookName), Times.Once());
106+
this.mockAutomationClient.Verify(f => f.ListJobSchedules(accountName, ref nextLink), Times.Once());
107107
}
108108

109109
[TestMethod]
110-
[Ignore]
111110
public void GetAzureAutomationScheduledRunbookByScheduleNameSuccessfull()
112111
{
113112
// Setup
114113
string accountName = "automation";
115114
string scheduleName = "schedule";
115+
string nextLink = string.Empty;
116116

117-
this.mockAutomationClient.Setup(f => f.ListJobSchedulesByScheduleName(accountName, scheduleName)).Returns((string a, string b) => new List<JobSchedule>());
117+
this.mockAutomationClient.Setup(f => f.ListJobSchedules(accountName, ref nextLink)).Returns((string a, string b) => new List<JobSchedule>());
118118

119119
// Test
120120
this.cmdlet.AutomationAccountName = accountName;
@@ -123,7 +123,7 @@ public void GetAzureAutomationScheduledRunbookByScheduleNameSuccessfull()
123123
this.cmdlet.ExecuteCmdlet();
124124

125125
// Assert
126-
this.mockAutomationClient.Verify(f => f.ListJobSchedulesByScheduleName(accountName, scheduleName), Times.Once());
126+
this.mockAutomationClient.Verify(f => f.ListJobSchedules(accountName, ref nextLink), Times.Once());
127127
}
128128

129129
[TestMethod]

0 commit comments

Comments
 (0)