Skip to content

Commit 08f4e22

Browse files
committed
7.2.1 release
1 parent 78e8597 commit 08f4e22

File tree

356 files changed

+4908
-5777
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

356 files changed

+4908
-5777
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Yes, SPClientCore works with the latest version of PowerShell 7. It means that y
2222

2323
### One module, manage all
2424

25-
SPClientCore includes both elements that site admin features and tenant admin features. You can run cmdlets for site admin by connecting to a site `(`https://tenant.sharepoint.com` and its sub URLs), and you can run tenant admin cmdlets for connecting to the SharePoint admin center (`https://tenant-admin.sharepoint.com`). You can also determine whether you are currently connected to the SharePoint admin center.
25+
SPClientCore includes both elements that site admin features and tenant admin features. You can run cmdlets for site admin by connecting to a site (`https://tenant.sharepoint.com` and its sub URLs), and you can run tenant admin cmdlets for connecting to the SharePoint admin center (`https://tenant-admin.sharepoint.com`). You can also determine whether you are currently connected to the SharePoint admin center.
2626

2727
### Friendly Naming
2828

source/.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ csharp_blank_lines_after_block_statements = 0
260260

261261
# Line Breaks preferences
262262
csharp_keep_user_linebreaks = false
263-
csharp_max_line_length = 0
263+
csharp_max_line_length = 160
264264
csharp_place_attribute_on_same_line = false
265265
csharp_insert_final_newline = true
266266
csharp_wrap_parameters_style = chop_if_long
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"ImageFileBase64": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=",
3-
"SubscriptionNotificationUrl": "https://prod-27.southeastasia.logic.azure.com:443/workflows/e0484ceabd3047589d7e2918850edc19/triggers/manual/paths/invoke?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=czHX2Z5ZeAwjttKjZLqcZgs095WwJqirWY84jIsFLvI"
3+
"SubscriptionNotificationUrl": "https://prod-12.japaneast.logic.azure.com:443/workflows/890b7cade2aa4abfa5c9dd88ed174a1f/triggers/Request/paths/invoke?api-version=2016-10-01&sp=%2Ftriggers%2FRequest%2Frun&sv=1.0&sig=Gws_hyjPOf-NMRBdAvhVHeL5US1Zs6Ovc6PoT2TkTDA"
44
}

source/Karamem0.SPClientCore.Test.Utility/Karamem0.SPClientCore.Test.Utility.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
</ItemGroup>
2929

3030
<ItemGroup>
31-
<None Update="Karamem0.SPClientCore.Tests.Utility.config.json">
31+
<None Update="Karamem0.SPClientCore.Test.Utility.config.json">
3232
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
33-
<Link>SPClientCore.Tests.Utility.config.json</Link>
33+
<Link>SPClientCore.Test.Utility.config.json</Link>
3434
</None>
3535
</ItemGroup>
3636

source/Karamem0.SPClientCore.Test.Utility/PSCmdletContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public PSCmdletContext()
2828
{
2929
this.AppSettings = new ConfigurationBuilder()
3030
.SetBasePath(Directory.GetCurrentDirectory())
31-
.AddJsonFile("SPClientCore.Tests.config.json")
31+
.AddJsonFile("SPClientCore.Test.config.json")
3232
.Build();
3333
this.Runspace = RunspaceFactory.CreateRunspace();
3434
this.Runspace.Open();

source/Karamem0.SPClientCore.Test.Utility/PSCmdletExtensions.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ public static IReadOnlyList<T> InvokeCommand<T>(
3636
IReadOnlyDictionary<string, object> parameters
3737
)
3838
{
39-
_ = runspace ?? throw new ArgumentNullException(nameof(runspace));
40-
_ = name ?? throw new ArgumentNullException(nameof(name));
41-
_ = parameters ?? throw new ArgumentNullException(nameof(parameters));
4239
var command = new Command(name);
4340
runspace.SessionStateProxy.PSVariable.Set("ConfirmPreference", "None");
4441
foreach (var parameter in parameters)

source/Karamem0.SPClientCore.Test.Utility/PSCmdletOptions.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,11 @@ namespace Karamem0.SharePoint.PowerShell.Test.Utility;
1919
public class PSCmdletOptions
2020
{
2121

22-
public static readonly Lazy<PSCmdletOptions> instance = new(
23-
() =>
22+
public static readonly Lazy<PSCmdletOptions> instance = new(() =>
2423
{
2524
var builder = new ConfigurationBuilder()
2625
.SetBasePath(Directory.GetCurrentDirectory())
27-
.AddJsonFile("SPClientCore.Tests.Utilities.config.json");
26+
.AddJsonFile("SPClientCore.Test.Utility.config.json");
2827
var config = builder.Build();
2928
var options = config.Get<PSCmdletOptions>();
3029
return options;

source/Karamem0.SPClientCore.Test/Commands/GetDriveCommandTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ public void InvokeCommand_GetByIdentity_ShouldSucceed()
6363
"Get-KshDrive",
6464
new Dictionary<string, object>()
6565
{
66+
["DriveId"] = context.AppSettings["List2DriveId"]
6667
}
6768
);
6869
var result2 = context.Runspace.InvokeCommand<Drive>(

source/Karamem0.SPClientCore.Test/Commands/GetFileCommandTests.cs

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public void InvokeCommand_GetByFileVersion_ShouldSucceed()
202202
}
203203

204204
[Test()]
205-
public void InvokeCommand_GetByTenantApp_ShouldSucceed()
205+
public void InvokeCommand_GetByApp_ShouldSucceed()
206206
{
207207
using var context = new PSCmdletContext();
208208
_ = context.Runspace.InvokeCommand(
@@ -216,41 +216,10 @@ public void InvokeCommand_GetByTenantApp_ShouldSucceed()
216216
}
217217
);
218218
var result1 = context.Runspace.InvokeCommand<App>(
219-
"Get-KshTenantApp",
219+
"Get-KshApp",
220220
new Dictionary<string, object>()
221221
{
222-
}
223-
);
224-
var result2 = context.Runspace.InvokeCommand<File>(
225-
"Get-KshFile",
226-
new Dictionary<string, object>()
227-
{
228-
["App"] = result1[0]
229-
}
230-
);
231-
var actual = result2[0];
232-
Assert.That(actual, Is.Not.Null);
233-
}
234-
235-
[Test()]
236-
public void InvokeCommand_GetBySiteCollectionApp_ShouldSucceed()
237-
{
238-
using var context = new PSCmdletContext();
239-
_ = context.Runspace.InvokeCommand(
240-
"Connect-KshSite",
241-
new Dictionary<string, object>()
242-
{
243-
["Url"] = context.AppSettings["BaseUrl"],
244-
["ClientId"] = context.AppSettings["ClientId"],
245-
["CertificatePath"] = context.AppSettings["CertificatePath"],
246-
["PrivateKeyPath"] = context.AppSettings["PrivateKeyPath"]
247-
}
248-
);
249-
var result1 = context.Runspace.InvokeCommand<App>(
250-
"Get-KshSiteCollectionApp",
251-
new Dictionary<string, object>()
252-
{
253-
["AppId"] = context.AppSettings["SiteCollectionApp1Id"]
222+
["Tenant"] = true
254223
}
255224
);
256225
var result2 = context.Runspace.InvokeCommand<File>(

source/Karamem0.SPClientCore.Test/Commands/SetApprovalStatusCommandTests.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,11 @@ public void InvokeCommand_ApproveFile_ShouldSucceed()
5252
}
5353
);
5454
_ = context.Runspace.InvokeCommand(
55-
"Publish-KshFile",
55+
"Set-KshFilePublished",
5656
new Dictionary<string, object>()
5757
{
58-
["Identity"] = result2[0]
58+
["File"] = result2[0],
59+
["Published"] = true
5960
}
6061
);
6162
_ = context.Runspace.InvokeCommand(
@@ -116,10 +117,11 @@ public void InvokeCommand_DenyFile_ShouldSucceed()
116117
}
117118
);
118119
_ = context.Runspace.InvokeCommand(
119-
"Publish-KshFile",
120+
"Set-KshFilePublished",
120121
new Dictionary<string, object>()
121122
{
122-
["Identity"] = result2[0]
123+
["File"] = result2[0],
124+
["Published"] = true
123125
}
124126
);
125127
_ = context.Runspace.InvokeCommand(

0 commit comments

Comments
 (0)