Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release cleanup #169

Merged
merged 1 commit into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added img/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/Alba.sln
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IdentityServer.New", "Ident
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_build", "..\build\_build.csproj", "{2D104BF1-7D1F-4DFF-9023-AEDF73C34B67}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2E8A0953-1670-4CDC-9C0E-C2E9051C31D8}"
ProjectSection(SolutionItems) = preProject
..\README.md = ..\README.md
..\img\icon.png = ..\img\icon.png
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down
8 changes: 7 additions & 1 deletion src/Alba/Alba.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,18 @@
<RepositoryType>git</RepositoryType>
<RepositoryUrl>git://github.com/JasperFx/alba</RepositoryUrl>
<OutputType>library</OutputType>
<PackageIconUrl>https://avatars2.githubusercontent.com/u/10048186?v=3&amp;s=200</PackageIconUrl>
<PackageIcon>icon.png</PackageIcon>
<nullable>enable</nullable>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>CS1591;</NoWarn>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
<None Include="..\..\img\icon.png" Pack="true" PackagePath="\" />
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="IdentityModel" Version="6.2.0" />
Expand Down
2 changes: 1 addition & 1 deletion src/Alba/AlbaJsonFormatterException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Alba;

public class AlbaJsonFormatterException : Exception
public sealed class AlbaJsonFormatterException : Exception
{
public AlbaJsonFormatterException(string json) : base($"The JSON formatter was unable to process the raw JSON:\n{json}")
{
Expand Down
2 changes: 1 addition & 1 deletion src/Alba/AlbaWebApplicationFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
namespace Alba;

/// <inheritdoc cref="WebApplicationFactory{TEntryPoint}"/>
public class AlbaWebApplicationFactory<TEntryPoint> : WebApplicationFactory<TEntryPoint>, IAlbaWebApplicationFactory where TEntryPoint : class
internal sealed class AlbaWebApplicationFactory<TEntryPoint> : WebApplicationFactory<TEntryPoint>, IAlbaWebApplicationFactory where TEntryPoint : class
{
private readonly Action<IWebHostBuilder> _configuration;
private readonly IAlbaExtension[] _extensions;
Expand Down
2 changes: 1 addition & 1 deletion src/Alba/HeaderExpectations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Alba;

public class HeaderExpectations
public sealed class HeaderExpectations
{
private readonly Scenario _parent;
private readonly string _headerKey;
Expand Down
2 changes: 1 addition & 1 deletion src/Alba/IAlbaWebApplicationFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Alba;

public interface IAlbaWebApplicationFactory : IDisposable, IAsyncDisposable
internal interface IAlbaWebApplicationFactory : IDisposable, IAsyncDisposable
{
public TestServer Server { get; }
public IServiceProvider Services { get; }
Expand Down
12 changes: 6 additions & 6 deletions src/Alba/IScenarioResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,17 @@ public interface IScenarioResult
/// Deserialize the contents of the HttpResponse.Body into an object
/// of type T using the configured Json serializer
/// </summary>
/// <typeparam name="T"></typeparam>
/// <returns></returns>
T? ReadAsJson<T>();
/// <exception cref="AlbaJsonFormatterException">Throws if the response cannot be deserialized.</exception>
/// <exception cref="EmptyResponseException">Throws if the response is empty.</exception>
T ReadAsJson<T>();

/// <summary>
/// Deserialize the contents of the HttpResponse.Body into an object
/// of type T using the configured Json serializer
/// </summary>
/// <typeparam name="T"></typeparam>
/// <returns></returns>
Task<T?> ReadAsJsonAsync<T>();
/// <exception cref="AlbaJsonFormatterException">Throws if the response cannot be deserialized.</exception>
/// <exception cref="EmptyResponseException">Throws if the response is empty.</exception>
Task<T> ReadAsJsonAsync<T>();

}
#endregion
2 changes: 1 addition & 1 deletion src/Alba/MimeType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Alba;
/// Strong-typed enumeration of common mime types that may be a useful helper within Alba
/// scenario definitions
/// </summary>
public class MimeType
public sealed class MimeType
{
public static readonly string HttpFormMimetype = "application/x-www-form-urlencoded";
public static readonly string MultipartMimetype = "multipart/form-data";
Expand Down
7 changes: 1 addition & 6 deletions src/Alba/ScenarioAssertionException.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using Alba.Internal;


namespace Alba;

public class ScenarioAssertionException : Exception
public sealed class ScenarioAssertionException : Exception
{
private readonly IList<string> _messages = new List<string>();

public ScenarioAssertionException()
{
}

/// <summary>
/// Add an assertion failure message
/// </summary>
Expand Down
4 changes: 2 additions & 2 deletions src/Alba/ScenarioResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ public Task<string> ReadAsTextAsync()
}

/// <inheritdoc />
public T? ReadAsJson<T>()
public T ReadAsJson<T>()
{
return _system.DefaultJson.Read<T>(this);
}

/// <inheritdoc />
public Task<T?> ReadAsJsonAsync<T>()
public Task<T> ReadAsJsonAsync<T>()
{
return _system.DefaultJson.ReadAsync<T>(this);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Alba/SendExpression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace Alba;

public class SendExpression
public sealed class SendExpression
{
private readonly Scenario _context;

Expand Down
Loading