Skip to content

Commit 7425415

Browse files
committed
Ported unit tests from main project
Ignored some tests for alpha release due to issues running against external db
1 parent 6ae174e commit 7425415

134 files changed

Lines changed: 11453 additions & 4 deletions

File tree

Some content is hidden

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

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ bin
22
obj
33
.vscode
44
.vs
5-
project.lock.json
5+
project.lock.json
6+
*.xproj.user

EventStore.ClientAPI.NetCore.sln

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 14
4+
VisualStudioVersion = 14.0.25420.1
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "EventStore.ClientAPI.NetCore", "src\EventStore.ClientAPI.NetCore\EventStore.ClientAPI.NetCore.xproj", "{AFE5579C-111B-47F3-96E0-5E08DAA2215C}"
7+
EndProject
8+
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Eventstore.ClientAPI.NetCore.Tests", "test\Eventstore.ClientAPI.NetCore.Tests\Eventstore.ClientAPI.NetCore.Tests.xproj", "{E5A83A9B-5E67-47DF-B96A-4401BB2AB3F1}"
9+
EndProject
10+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{409E446B-19AB-4BE4-91D8-7BD3BC2A0C37}"
11+
ProjectSection(SolutionItems) = preProject
12+
global.json = global.json
13+
EndProjectSection
14+
EndProject
15+
Global
16+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
17+
Debug|Any CPU = Debug|Any CPU
18+
Release|Any CPU = Release|Any CPU
19+
EndGlobalSection
20+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
21+
{AFE5579C-111B-47F3-96E0-5E08DAA2215C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
22+
{AFE5579C-111B-47F3-96E0-5E08DAA2215C}.Debug|Any CPU.Build.0 = Debug|Any CPU
23+
{AFE5579C-111B-47F3-96E0-5E08DAA2215C}.Release|Any CPU.ActiveCfg = Release|Any CPU
24+
{AFE5579C-111B-47F3-96E0-5E08DAA2215C}.Release|Any CPU.Build.0 = Release|Any CPU
25+
{E5A83A9B-5E67-47DF-B96A-4401BB2AB3F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
26+
{E5A83A9B-5E67-47DF-B96A-4401BB2AB3F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
27+
{E5A83A9B-5E67-47DF-B96A-4401BB2AB3F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
28+
{E5A83A9B-5E67-47DF-B96A-4401BB2AB3F1}.Release|Any CPU.Build.0 = Release|Any CPU
29+
EndGlobalSection
30+
GlobalSection(SolutionProperties) = preSolution
31+
HideSolutionNode = FALSE
32+
EndGlobalSection
33+
EndGlobal

global.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"projects": [ "src" ]
3+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0.25420" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0.25420</VisualStudioVersion>
5+
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
6+
</PropertyGroup>
7+
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
8+
<PropertyGroup Label="Globals">
9+
<ProjectGuid>afe5579c-111b-47f3-96e0-5e08daa2215c</ProjectGuid>
10+
<RootNamespace>EventStore.ClientAPI.NetCore</RootNamespace>
11+
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
12+
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
13+
</PropertyGroup>
14+
<PropertyGroup>
15+
<SchemaVersion>2.0</SchemaVersion>
16+
</PropertyGroup>
17+
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
18+
</Project>

src/EventStore.ClientApi.NetCore/IEventStoreConnection.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ EventStoreAllCatchUpSubscription SubscribeToAllFrom(
487487
/// <param name="groupName">The name of the group to create</param>
488488
/// <param name="settings">The <see cref="PersistentSubscriptionSettings"></see> for the subscription</param>
489489
/// <param name="credentials">The credentials to be used for this operation.</param>
490-
/// <returns>A <see cref="PersistentSubscriptionCreateResult"/>.</returns>
490+
/// <returns>A <see cref="Task"/>.</returns>
491491
Task UpdatePersistentSubscriptionAsync(string stream, string groupName, PersistentSubscriptionSettings settings, UserCredentials credentials);
492492

493493

@@ -498,7 +498,7 @@ EventStoreAllCatchUpSubscription SubscribeToAllFrom(
498498
/// <param name="groupName">The name of the group to create</param>
499499
/// <param name="settings">The <see cref="PersistentSubscriptionSettings"></see> for the subscription</param>
500500
/// <param name="credentials">The credentials to be used for this operation.</param>
501-
/// <returns>A <see cref="PersistentSubscriptionCreateResult"/>.</returns>
501+
/// <returns>A <see cref="Task"/>.</returns>
502502
Task CreatePersistentSubscriptionAsync(string stream, string groupName, PersistentSubscriptionSettings settings, UserCredentials credentials);
503503

504504

@@ -508,7 +508,7 @@ EventStoreAllCatchUpSubscription SubscribeToAllFrom(
508508
/// <param name="stream">The name of the stream to delete the persistent subscription on</param>
509509
/// <param name="groupName">The name of the group to delete</param>
510510
/// <param name="userCredentials">User credentials to use for the operation</param>
511-
/// <returns>A <see cref="PersistentSubscriptionDeleteResult"/>.</returns>
511+
/// <returns>A <see cref="Task"/>.</returns>
512512
Task DeletePersistentSubscriptionAsync(string stream, string groupName, UserCredentials userCredentials = null);
513513

514514
/*

src/EventStore.ClientApi.NetCore/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@
1616

1717
[assembly: ComVisible(false)]
1818
[assembly: Guid("0bffd734-18c5-4575-9321-324ed1a3bbfb")]
19+
[assembly: InternalsVisibleTo("EventStore.ClientAPI.NetCore.Tests")]
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Net;
5+
using System.Threading.Tasks;
6+
using EventStore.ClientAPI.SystemData;
7+
8+
namespace Eventstore.ClientAPI.Tests
9+
{
10+
public class DefaultData
11+
{
12+
public static string AdminUsername = SystemUsers.Admin;
13+
public static string AdminPassword = SystemUsers.DefaultAdminPassword;
14+
public static UserCredentials AdminCredentials = new UserCredentials(AdminUsername, AdminPassword);
15+
public static NetworkCredential AdminNetworkCredentials = new NetworkCredential(AdminUsername, AdminPassword);
16+
}
17+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace Eventstore.ClientAPI.Tests
2+
{
3+
public static class EventNumber
4+
{
5+
public const int DeletedStream = int.MaxValue;
6+
public const int Invalid = int.MinValue;
7+
}
8+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
5+
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
6+
</PropertyGroup>
7+
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
8+
<PropertyGroup Label="Globals">
9+
<ProjectGuid>e5a83a9b-5e67-47df-b96a-4401bb2ab3f1</ProjectGuid>
10+
<RootNamespace>Eventstore.ClientAPI.Tests</RootNamespace>
11+
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
12+
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
13+
</PropertyGroup>
14+
<PropertyGroup>
15+
<SchemaVersion>2.0</SchemaVersion>
16+
</PropertyGroup>
17+
<ItemGroup>
18+
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
19+
</ItemGroup>
20+
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
21+
</Project>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<ActiveDebugProfile>Start</ActiveDebugProfile>
5+
</PropertyGroup>
6+
</Project>

0 commit comments

Comments
 (0)