Skip to content

Commit

Permalink
Run code formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
Bicep Automation committed Mar 24, 2024
1 parent 3bd194f commit 29a237e
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 19 deletions.
4 changes: 2 additions & 2 deletions src/Bicep.Core.UnitTests/Assertions/ResultAssertions.cs
Expand Up @@ -36,11 +36,11 @@ public ResultAssertions(Result<TSuccess, TError> result)
{
Execute.Assertion
.BecauseOf(because, becauseArgs)
.Given<Result<TSuccess,TError>>(() => Subject)
.Given<Result<TSuccess, TError>>(() => Subject)
.ForCondition(x => !x.IsSuccess())
.FailWith("Expected result to be a failure{reason}, but it was a success with value {0}", x => x.TryUnwrap());

return new AndConstraint<ResultAssertions<TSuccess,TError>>(this);
return new AndConstraint<ResultAssertions<TSuccess, TError>>(this);

}
public AndConstraint<ResultAssertions<TSuccess, TError>> BeFailureWithValue(TError expectedError, string because = "", params object[] becauseArgs)
Expand Down
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using Bicep.Core.Utils;
using Bicep.Core.UnitTests.Assertions;
using Bicep.Core.Utils;
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;

Expand Down
Expand Up @@ -422,7 +422,7 @@ ObjectPropertyExpression convertObjectProperty(JProperty property)
key,
ConvertToExpression(parsedExpressions, property.Value));
}


if (parsedExpressions.TryGetValue(toConvert, out var armExpression))
{
Expand Down
26 changes: 13 additions & 13 deletions src/Bicep.Core/Semantics/Namespaces/ThirdPartyNamespaceType.cs
Expand Up @@ -22,19 +22,19 @@ public static NamespaceType Create(string name, string aliasName, IResourceTypeP
// NamespaceConfig is not null
if (resourceTypeProvider is ThirdPartyResourceTypeProvider thirdPartyProvider && thirdPartyProvider.GetNamespaceConfiguration() is NamespaceConfiguration namespaceConfig && namespaceConfig != null)
{
return new NamespaceType(
aliasName,
new NamespaceSettings(
IsSingleton: namespaceConfig.IsSingleton,
BicepProviderName: namespaceConfig.Name,
ConfigurationType: (ObjectType?)namespaceConfig.ConfigurationObject,
ArmTemplateProviderName: namespaceConfig.Name,
ArmTemplateProviderVersion: namespaceConfig.Version),
ImmutableArray<TypeProperty>.Empty,
ImmutableArray<FunctionOverload>.Empty,
ImmutableArray<BannedFunction>.Empty,
ImmutableArray<Decorator>.Empty,
resourceTypeProvider);
return new NamespaceType(
aliasName,
new NamespaceSettings(
IsSingleton: namespaceConfig.IsSingleton,
BicepProviderName: namespaceConfig.Name,
ConfigurationType: (ObjectType?)namespaceConfig.ConfigurationObject,
ArmTemplateProviderName: namespaceConfig.Name,
ArmTemplateProviderVersion: namespaceConfig.Version),
ImmutableArray<TypeProperty>.Empty,
ImmutableArray<FunctionOverload>.Empty,
ImmutableArray<BannedFunction>.Empty,
ImmutableArray<Decorator>.Empty,
resourceTypeProvider);
}

// NamespaceConfig is required to be set for 3PProviders
Expand Down
Expand Up @@ -66,7 +66,7 @@ public ResourceTypeComponents LoadType(ResourceTypeReference reference)

TypeSymbol? configurationType = null;

if (typeSettings.ConfigurationType is {} reference)
if (typeSettings.ConfigurationType is { } reference)
{

if (typeLoader.LoadType(reference) is not ObjectType objectType)
Expand Down
Expand Up @@ -124,7 +124,8 @@ private static TypePropertyFlags ConvertToReadOnly(TypePropertyFlags typePropert
{
var loadedFallbackType = resourceTypeLoader.LoadFallbackResourceType();

if (loadedFallbackType != null){
if (loadedFallbackType != null)
{
var resourceType = generatedTypeCache.GetOrAdd(flags, typeReference, () =>
{
var resourceType = new ResourceTypeComponents(
Expand Down

0 comments on commit 29a237e

Please sign in to comment.