Skip to content
This repository was archived by the owner on Oct 6, 2020. It is now read-only.

Commit 836d477

Browse files
Merge pull request #27 from justaprogrammer/image-management
Image Management
2 parents d9f0c6f + 3ad96f2 commit 836d477

Some content is hidden

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

42 files changed

+611
-1060
lines changed

Build.fsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ Target.create "TestData" (fun _ ->
120120
test "SonOfPicasso.Data.Tests" "netcoreapp3.0" "datatest"
121121
)
122122

123+
Target.create "TestIntegration" (fun _ ->
124+
test "SonOfPicasso.Core.IntegrationTests" "netcoreapp3.0" "integration"
125+
)
126+
123127
Target.create "Package" (fun _ ->
124128
let packagePath = (sprintf "build/son-of-picasso-%s.zip" fullSemver)
125129

@@ -142,6 +146,7 @@ open Fake.Core.TargetOperators
142146
"Build" ==> "TestCore" ==> "Test"
143147
"Build" ==> "TestUI" ==> "Test"
144148
"Build" ==> "TestData" ==> "Test"
149+
"Build" ==> "TestIntegration" ==> "Test"
145150

146151
"Build" ==> "Test" ==> "Default"
147152
"Build" ==> "Package" ==> "Default"

SonOfPicasso.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SonOfPicasso.UI", "src\SonO
3333
EndProject
3434
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SonOfPicasso.UI.Tests", "src\SonOfPicasso.UI.Tests\SonOfPicasso.UI.Tests.csproj", "{9D06ACFE-6ECD-4EC9-9CA9-8D6CCC5C362A}"
3535
EndProject
36+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SonOfPicasso.Core.IntegrationTests", "src\SonOfPicasso.Core.IntegrationTests\SonOfPicasso.Core.IntegrationTests.csproj", "{B86E824C-FAAA-4DBC-B6A9-292D0CEC5797}"
37+
EndProject
3638
Global
3739
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3840
Debug|Any CPU = Debug|Any CPU
@@ -71,6 +73,10 @@ Global
7173
{9D06ACFE-6ECD-4EC9-9CA9-8D6CCC5C362A}.Debug|Any CPU.Build.0 = Debug|Any CPU
7274
{9D06ACFE-6ECD-4EC9-9CA9-8D6CCC5C362A}.Release|Any CPU.ActiveCfg = Release|Any CPU
7375
{9D06ACFE-6ECD-4EC9-9CA9-8D6CCC5C362A}.Release|Any CPU.Build.0 = Release|Any CPU
76+
{B86E824C-FAAA-4DBC-B6A9-292D0CEC5797}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
77+
{B86E824C-FAAA-4DBC-B6A9-292D0CEC5797}.Debug|Any CPU.Build.0 = Debug|Any CPU
78+
{B86E824C-FAAA-4DBC-B6A9-292D0CEC5797}.Release|Any CPU.ActiveCfg = Release|Any CPU
79+
{B86E824C-FAAA-4DBC-B6A9-292D0CEC5797}.Release|Any CPU.Build.0 = Release|Any CPU
7480
EndGlobalSection
7581
GlobalSection(SolutionProperties) = preSolution
7682
HideSolutionNode = FALSE
@@ -81,6 +87,7 @@ Global
8187
{1D87A79F-C5D4-4EA0-B978-13E942B9CEE9} = {12E2CEF6-EB9D-412F-98E3-ECBBBD00A29A}
8288
{2F6B9B2C-D228-4563-B74C-12C18E753361} = {12E2CEF6-EB9D-412F-98E3-ECBBBD00A29A}
8389
{9D06ACFE-6ECD-4EC9-9CA9-8D6CCC5C362A} = {12E2CEF6-EB9D-412F-98E3-ECBBBD00A29A}
90+
{B86E824C-FAAA-4DBC-B6A9-292D0CEC5797} = {12E2CEF6-EB9D-412F-98E3-ECBBBD00A29A}
8491
EndGlobalSection
8592
GlobalSection(ExtensibilityGlobals) = postSolution
8693
SolutionGuid = {2C01583D-05D7-4F03-A86C-ECF79DA041D0}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
using System;
2+
using Autofac.Extras.NSubstitute;
3+
using SonOfPicasso.Data.Repository;
4+
using SonOfPicasso.Data.Tests;
5+
using SonOfPicasso.Testing.Common;
6+
using Xunit;
7+
using Xunit.Abstractions;
8+
9+
namespace SonOfPicasso.Core.IntegrationTests.Services
10+
{
11+
public class ImageManagementServiceTests : DataTestsBase, IDisposable
12+
{
13+
private readonly AutoSubstitute _autoSubstitute;
14+
15+
public ImageManagementServiceTests(ITestOutputHelper testOutputHelper)
16+
: base(testOutputHelper)
17+
{
18+
_autoSubstitute = new AutoSubstitute();
19+
_autoSubstitute.Provide<Func<UnitOfWork>>(CreateUnitOfWork);
20+
}
21+
22+
[Fact]
23+
public void CanInitialize()
24+
{
25+
var imageManagementService = _autoSubstitute.Resolve<Core.Services.ImageManagementService>();
26+
}
27+
28+
public new void Dispose()
29+
{
30+
_autoSubstitute.Dispose();
31+
base.Dispose();
32+
}
33+
}
34+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netcoreapp3.0</TargetFramework>
5+
6+
<IsPackable>false</IsPackable>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<PackageReference Include="akavache" Version="6.8.1" />
11+
<PackageReference Include="Autofac" Version="4.9.4" />
12+
<PackageReference Include="Autofac.Extras.NSubstitute" Version="1.1.0" />
13+
<PackageReference Include="FluentAssertions" Version="5.9.0" />
14+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0-preview-20190828-03" />
15+
<PackageReference Include="NSubstitute" Version="4.2.1" />
16+
<PackageReference Include="NSubstitute.Analyzers.CSharp" Version="1.0.10" />
17+
<PackageReference Include="Serilog" Version="2.8.0" />
18+
<PackageReference Include="System.IO.Abstractions.TestingHelpers" Version="6.0.27" />
19+
<PackageReference Include="xunit" Version="2.4.1" />
20+
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
21+
<PrivateAssets>all</PrivateAssets>
22+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
23+
</PackageReference>
24+
</ItemGroup>
25+
26+
<ItemGroup>
27+
<ProjectReference Include="..\SonOfPicasso.Data.Tests\SonOfPicasso.Data.Tests.csproj" />
28+
</ItemGroup>
29+
30+
</Project>

0 commit comments

Comments
 (0)