Skip to content

Commit 3b9dfb8

Browse files
committed
use fluentassertions
1 parent 5d8df47 commit 3b9dfb8

File tree

2 files changed

+12
-48
lines changed

2 files changed

+12
-48
lines changed

Cassandra.DistributedTaskQueue.Tests/RemoteTaskQueue/RepositoriesTests/TimeBasedBlobStorageTest.cs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
using System.Diagnostics.CodeAnalysis;
33
using System.Linq;
44

5+
using FluentAssertions;
6+
57
using GroboContainer.NUnitExtensions;
68

79
using NUnit.Framework;
@@ -162,15 +164,15 @@ public void ReadAll()
162164
WriteByte(id21, 21);
163165
WriteByte(id22, 22);
164166

165-
Assert.That(timeBasedBlobStorage.ReadAll(1).Select(x => Tuple.Create(x.Item1, x.Item2.Single())).ToArray(),
166-
Is.EquivalentTo(new[]
167-
{
168-
new Tuple<BlobId, byte>(idLarge, 255),
169-
new Tuple<BlobId, byte>(id11, 11),
170-
new Tuple<BlobId, byte>(id12, 12),
171-
new Tuple<BlobId, byte>(id21, 21),
172-
new Tuple<BlobId, byte>(id22, 22),
173-
}));
167+
var result = timeBasedBlobStorage.ReadAll(1).Select(x => Tuple.Create(x.Item1, x.Item2.Single())).ToArray();
168+
result.Should().BeEquivalentTo(new[]
169+
{
170+
new Tuple<BlobId, byte>(idLarge, 255),
171+
new Tuple<BlobId, byte>(id11, 11),
172+
new Tuple<BlobId, byte>(id12, 12),
173+
new Tuple<BlobId, byte>(id21, 21),
174+
new Tuple<BlobId, byte>(id22, 22),
175+
});
174176
}
175177

176178
[Test]

appveyor.yml

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,6 @@ init:
1212
nuget:
1313
disable_publish_on_pr: true
1414

15-
environment:
16-
NPM_TOKEN:
17-
secure: Gx5yyFrlELZY4DNW/uAuiXdhUADacNqi3LptQwldv8O61KpYyiDUniA8lBJ5jfne
18-
19-
install:
20-
- cmd: docker-compose up -d
21-
2215
before_build:
2316
- ps: |
2417
$ErrorActionPreference = "Stop"
@@ -42,50 +35,19 @@ before_build:
4235
}
4336
- cmd: dotnet --info
4437
- cmd: dotnet restore ./Cassandra.DistributedTaskQueue.sln --verbosity minimal
45-
- cmd: dotnet tool restore
46-
- cmd: cd cassandra-distributed-task-queue-ui && yarn install --frozen-lockfile
4738

4839
build_script:
4940
- cmd: dotnet build --configuration Release ./Cassandra.DistributedTaskQueue.sln
5041
- cmd: dotnet pack --no-build --configuration Release ./Cassandra.DistributedTaskQueue.sln
51-
- cmd: cd cassandra-distributed-task-queue-ui && yarn build
52-
53-
before_test:
54-
- ps: Start-Process ./Cassandra.DistributedTaskQueue.TestExchangeService/bin/net5.0/SkbKontur.Cassandra.DistributedTaskQueue.TestExchangeService.exe -ArgumentList "--urls http://localhost:4403"
55-
- ps: Start-Process ./Cassandra.DistributedTaskQueue.TestExchangeService/bin/net5.0/SkbKontur.Cassandra.DistributedTaskQueue.TestExchangeService.exe -ArgumentList "--urls http://localhost:4404"
56-
- ps: Start-Process ./Cassandra.DistributedTaskQueue.TestExchangeService/bin/net5.0/SkbKontur.Cassandra.DistributedTaskQueue.TestExchangeService.exe -ArgumentList "--urls http://localhost:4405"
57-
- ps: Start-Process ./Cassandra.DistributedTaskQueue.TestExchangeService/bin/net5.0/SkbKontur.Cassandra.DistributedTaskQueue.TestExchangeService.exe -ArgumentList "--urls http://localhost:4406"
58-
- ps: Start-Process ./Cassandra.DistributedTaskQueue.TestExchangeService/bin/net5.0/SkbKontur.Cassandra.DistributedTaskQueue.TestExchangeService.exe -ArgumentList "--urls http://localhost:4407"
59-
- ps: Start-Process ./Cassandra.DistributedTaskQueue.Monitoring.TestService/bin/net5.0/SkbKontur.Cassandra.DistributedTaskQueue.Monitoring.TestService.exe -ArgumentList "--urls http://localhost:4413"
60-
61-
test_script:
62-
- cmd: dotnet jb cleanupcode Cassandra.DistributedTaskQueue.sln --profile=CatalogueCleanup --verbosity=WARN
63-
- cmd: git diff --exit-code
64-
- cmd: dotnet test --no-build --configuration Release ./Cassandra.DistributedTaskQueue.Tests/Cassandra.DistributedTaskQueue.Tests.csproj
65-
- cmd: cd cassandra-distributed-task-queue-ui && yarn lint
66-
67-
after_test:
68-
- ps: |
69-
if ($env:SHOULD_PUBLISH_NUGET_PACKAGE -eq "true")
70-
{
71-
npm config set '//registry.npmjs.org/:_authToken' $env:NPM_TOKEN
72-
$fileNames = Get-ChildItem -Path "cassandra-distributed-task-queue-ui/dist" -Recurse -Include *.tgz
73-
foreach ($file in $fileNames)
74-
{
75-
Write-Host "Will publish npm package $($file.Name)" -ForegroundColor "Green"
76-
npm publish $file.FullName --quiet
77-
}
78-
}
7942

8043
artifacts:
8144
- path: './Cassandra.DistributedTaskQueue*/bin/Release/*.nupkg'
82-
- path: './cassandra-distributed-task-queue-ui/dist/*.tgz'
8345

8446
deploy:
8547
- provider: NuGet
8648
server: https://nuget.org
8749
api_key:
88-
secure: y2RPf+gBBqffQVm8pg9qZcg99m7K8hsSa4z7VHvIE6t+kuO7r/oIqTVcryZzL93D
50+
secure: 3Myenol+seNdEnkmH7tadxQLsmOE7VWQSp6vQii4vt2dX1S7XwjNV4T24HQTUsrr
8951
skip_symbols: true
9052
on:
9153
SHOULD_PUBLISH_NUGET_PACKAGE: true

0 commit comments

Comments
 (0)