File tree Expand file tree Collapse file tree 5 files changed +18
-12
lines changed
Umbraco.Cms.Api.Management/Services/Signs
tests/Umbraco.Tests.UnitTests/Umbraco.Cms.Api.Management/Services/Signs Expand file tree Collapse file tree 5 files changed +18
-12
lines changed Original file line number Diff line number Diff line change
1
+ using Serilog . Core ;
1
2
using Umbraco . Cms . Api . Management . ViewModels . Tree ;
2
3
using Umbraco . Cms . Core . Models . Entities ;
3
4
using Umbraco . Cms . Core . Services ;
4
- using Umbraco . Extensions ;
5
+ using Constants = Umbraco . Cms . Core . Constants ;
5
6
6
7
namespace Umbraco . Cms . Api . Management . Services . Signs ;
7
8
@@ -10,7 +11,7 @@ namespace Umbraco.Cms.Api.Management.Services.Signs;
10
11
/// </summary>
11
12
internal class HasScheduleSignProvider : ISignProvider
12
13
{
13
- private const string Alias = ISignProvider . Prefix + "ScheduledForPublish" ;
14
+ private const string Alias = Constants . Conventions . Signs . Prefix + "ScheduledForPublish" ;
14
15
15
16
private readonly IContentService _contentService ;
16
17
Original file line number Diff line number Diff line change @@ -8,11 +8,6 @@ namespace Umbraco.Cms.Api.Management.Services.Signs;
8
8
/// </summary>
9
9
public interface ISignProvider
10
10
{
11
- /// <summary>
12
- /// Prefix of each sign alias.
13
- /// </summary>
14
- const string Prefix = "Umb." ;
15
-
16
11
/// <summary>
17
12
/// Gets a value indicating whether this provider can provide tree signs for the specified item type.
18
13
/// </summary>
Original file line number Diff line number Diff line change 1
1
using Umbraco . Cms . Api . Management . ViewModels . Tree ;
2
+ using Umbraco . Cms . Core ;
2
3
using Umbraco . Cms . Core . Models . Entities ;
3
4
4
5
namespace Umbraco . Cms . Api . Management . Services . Signs ;
5
6
6
7
internal class IsProtectedSignProvider : ISignProvider
7
8
{
8
- private const string Alias = ISignProvider . Prefix + "IsProtected" ;
9
+ private const string Alias = Constants . Conventions . Signs . Prefix + "IsProtected" ;
9
10
10
11
/// <inheritdoc/>>
11
12
public bool CanProvideTreeSigns < TItem > ( ) => typeof ( TItem ) == typeof ( DocumentTreeItemResponseModel ) ;
Original file line number Diff line number Diff line change @@ -303,5 +303,16 @@ public static class Udi
303
303
{
304
304
public const string Prefix = "umb://" ;
305
305
}
306
+
307
+ /// <summary>
308
+ /// Constants for all Sign aliases.
309
+ /// </summary>
310
+ public static class Signs
311
+ {
312
+ /// <summary>
313
+ /// Prefix for all signs aliases.
314
+ /// </summary>
315
+ public const string Prefix = "Umb." ;
316
+ }
306
317
}
307
318
}
Original file line number Diff line number Diff line change 1
- using Moq ;
2
- using NUnit . Framework ;
1
+ using NUnit . Framework ;
3
2
using Umbraco . Cms . Api . Management . Services . Signs ;
4
3
using Umbraco . Cms . Api . Management . ViewModels . Tree ;
5
4
using Umbraco . Cms . Core . Models . Entities ;
6
- using Umbraco . Cms . Core . Services ;
7
5
8
6
namespace Umbraco . Cms . Tests . UnitTests . Umbraco . Cms . Api . Management . Services . Signs ;
9
7
10
8
[ TestFixture ]
11
- internal class IsProtectedSignProviderTest
9
+ internal class IsProtectedSignProviderTests
12
10
{
13
11
[ Test ]
14
12
public async Task IsProtectedSignProvider_Should_Populate_Signs ( )
You can’t perform that action at this time.
0 commit comments