Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit b392c72

Browse files
committed
Squashed 'dotnet-server-sdk-shared-tests/' content from commit 3eff003
git-subtree-dir: dotnet-server-sdk-shared-tests git-subtree-split: 3eff003e97636d616bee8c1b87b6a5699cf46ccf
0 parents  commit b392c72

File tree

10 files changed

+892
-0
lines changed

10 files changed

+892
-0
lines changed

.circleci/config.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: 2
2+
workflows:
3+
version: 2
4+
test:
5+
jobs:
6+
- test
7+
jobs:
8+
test:
9+
docker:
10+
- image: mcr.microsoft.com/dotnet/core/sdk:2.1-focal
11+
steps:
12+
- checkout
13+
- run: dotnet restore
14+
- run: dotnet build LaunchDarkly.ServerSdk.SharedTests -f netstandard2.0
15+
- run: dotnet test LaunchDarkly.ServerSdk.SharedTests.Tests/LaunchDarkly.ServerSdk.SharedTests.Tests.csproj -f netcoreapp2.1

.gitignore

Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
#################
2+
## Eclipse
3+
#################
4+
5+
*.pydevproject
6+
.project
7+
.metadata
8+
bin/
9+
tmp/
10+
*.tmp
11+
*.bak
12+
*.swp
13+
*~.nib
14+
local.properties
15+
.classpath
16+
.settings/
17+
.loadpath
18+
19+
# External tool builders
20+
.externalToolBuilders/
21+
22+
# Locally stored "Eclipse launch configurations"
23+
*.launch
24+
25+
# CDT-specific
26+
.cproject
27+
28+
# PDT-specific
29+
.buildpath
30+
31+
32+
#################
33+
## Visual Studio
34+
#################
35+
36+
## Ignore Visual Studio temporary files, build results, and
37+
## files generated by popular Visual Studio add-ons.
38+
39+
# User-specific files
40+
*.suo
41+
*.user
42+
*.sln.docstates
43+
44+
# Build results
45+
[Dd]ebug/
46+
[Rr]elease/
47+
*_i.c
48+
*_p.c
49+
*.ilk
50+
*.meta
51+
*.obj
52+
*.pch
53+
*.pdb
54+
*.pgc
55+
*.pgd
56+
*.rsp
57+
*.sbr
58+
*.tlb
59+
*.tli
60+
*.tlh
61+
*.tmp
62+
*.vspscc
63+
.builds
64+
*.dotCover
65+
66+
## TODO: If you have NuGet Package Restore enabled, uncomment this
67+
packages/
68+
src/packages/
69+
src/LaunchDarkly.Tests/App.config
70+
71+
# Visual C++ cache files
72+
ipch/
73+
*.aps
74+
*.ncb
75+
*.opensdf
76+
*.sdf
77+
78+
# Visual Studio 2015 cache/options directory
79+
.vs/
80+
81+
# Visual Studio profiler
82+
*.psess
83+
*.vsp
84+
85+
# ReSharper is a .NET coding add-in
86+
_ReSharper*
87+
88+
# Installshield output folder
89+
[Ee]xpress
90+
91+
# DocProject is a documentation generator add-in
92+
DocProject/buildhelp/
93+
DocProject/Help/*.HxT
94+
DocProject/Help/*.HxC
95+
DocProject/Help/*.hhc
96+
DocProject/Help/*.hhk
97+
DocProject/Help/*.hhp
98+
DocProject/Help/Html2
99+
DocProject/Help/html
100+
101+
# Click-Once directory
102+
publish
103+
104+
# Others
105+
[Bb]in
106+
[Oo]bj
107+
sql
108+
TestResults
109+
*.Cache
110+
ClientBin
111+
stylecop.*
112+
~$*
113+
*.dbmdl
114+
Generated_Code #added for RIA/Silverlight projects
115+
116+
# Backup & report files from converting an old project file to a newer
117+
# Visual Studio version. Backup files are not needed, because we have git ;-)
118+
_UpgradeReport_Files/
119+
Backup*/
120+
UpgradeLog*.XML
121+
122+
123+
124+
############
125+
## Windows
126+
############
127+
128+
# Windows image file caches
129+
Thumbs.db
130+
131+
# Folder config file
132+
Desktop.ini
133+
134+
135+
#############
136+
## Python
137+
#############
138+
139+
*.py[co]
140+
141+
# Packages
142+
*.egg
143+
*.egg-info
144+
dist
145+
build
146+
eggs
147+
parts
148+
bin
149+
var
150+
sdist
151+
develop-eggs
152+
.installed.cfg
153+
154+
# Installer logs
155+
pip-log.txt
156+
157+
# Unit test / coverage reports
158+
.coverage
159+
.tox
160+
161+
#Translations
162+
*.mo
163+
164+
#Mr Developer
165+
.mr.developer.cfg
166+
167+
# Mac crap
168+
.DS_Store
169+
170+
# Ignore built nupkgs
171+
*.nupkg
172+
PortabilityAnalysis.html
173+
nuget.exe
174+
175+
########################
176+
## .NET Core / VS Code
177+
########################
178+
179+
project.lock.json
180+
181+
*.snk

LICENSE

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright 2018 Catamorphic, Co.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
4+
<IsPackable>false</IsPackable>
5+
</PropertyGroup>
6+
7+
<ItemGroup>
8+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
9+
<PackageReference Include="xunit" Version="2.4.1" />
10+
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
11+
</ItemGroup>
12+
</Project>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26730.16
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LaunchDarkly.ServerSdk.SharedTests", "LaunchDarkly.ServerSdk.SharedTests\LaunchDarkly.ServerSdk.SharedTests.csproj", "{44904ADC-8CD1-414E-9184-9378CEB4B9CE}"
7+
EndProject
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LaunchDarkly.ServerSdk.SharedTests.Tests", "LaunchDarkly.ServerSdk.SharedTests.Tests\LaunchDarkly.ServerSdk.SharedTests.Tests.csproj", "{79BC10FD-FF08-40FD-B87D-E54549C1F71F}"
9+
EndProject
10+
Global
11+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
12+
Debug|Any CPU = Debug|Any CPU
13+
Release|Any CPU = Release|Any CPU
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{44904ADC-8CD1-414E-9184-9378CEB4B9CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17+
{44904ADC-8CD1-414E-9184-9378CEB4B9CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
18+
{44904ADC-8CD1-414E-9184-9378CEB4B9CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
19+
{44904ADC-8CD1-414E-9184-9378CEB4B9CE}.Release|Any CPU.Build.0 = Release|Any CPU
20+
{79BC10FD-FF08-40FD-B87D-E54549C1F71F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21+
{79BC10FD-FF08-40FD-B87D-E54549C1F71F}.Debug|Any CPU.Build.0 = Debug|Any CPU
22+
{79BC10FD-FF08-40FD-B87D-E54549C1F71F}.Release|Any CPU.ActiveCfg = Release|Any CPU
23+
{79BC10FD-FF08-40FD-B87D-E54549C1F71F}.Release|Any CPU.Build.0 = Release|Any CPU
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
27+
EndGlobalSection
28+
GlobalSection(ExtensibilityGlobals) = postSolution
29+
SolutionGuid = {C92D0169-FDC9-4B5A-A3FA-70CD9609660D}
30+
EndGlobalSection
31+
EndGlobal
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
using System;
2+
using System.Collections.Generic;
3+
4+
namespace LaunchDarkly.Client.SharedTests.FeatureStore
5+
{
6+
/// <summary>
7+
/// Simplifies building the input parameter for a feature store's Init method.
8+
/// </summary>
9+
public class DataBuilder
10+
{
11+
private readonly IDictionary<IVersionedDataKind, IDictionary<String, IVersionedData>> _data =
12+
new Dictionary<IVersionedDataKind, IDictionary<String, IVersionedData>>();
13+
14+
public DataBuilder Add(IVersionedDataKind kind, params IVersionedData[] items)
15+
{
16+
IDictionary<String, IVersionedData> itemsDict;
17+
if (!_data.TryGetValue(kind, out itemsDict))
18+
{
19+
itemsDict = new Dictionary<String, IVersionedData>();
20+
_data[kind] = itemsDict;
21+
}
22+
foreach (var item in items)
23+
{
24+
itemsDict[item.Key] = item;
25+
}
26+
return this;
27+
}
28+
29+
public IDictionary<IVersionedDataKind, IDictionary<String, IVersionedData>> Build()
30+
{
31+
return _data;
32+
}
33+
}
34+
}

0 commit comments

Comments
 (0)