forked from growthbook/growthbook-c-sharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: generic code improvements. + file scoped namespaces
- Loading branch information
1 parent
179b5fa
commit 41c73d6
Showing
3 changed files
with
162 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,40 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Reflection; | ||
|
||
using GrowthBook.Tests.Json; | ||
|
||
using Newtonsoft.Json; | ||
|
||
using Xunit; | ||
|
||
namespace GrowthBook.Tests | ||
namespace GrowthBook.Tests; | ||
|
||
public class NamespaceTupleConverterTests | ||
{ | ||
public class NamespaceTupleConverterTests | ||
[Fact] | ||
public void CreateFromJson_NoFeatures_ShouldSucceed() | ||
{ | ||
[Fact] | ||
public void CreateFromJson_NoFeatures_ShouldSucceed() | ||
{ | ||
string json = JsonTestHelpers.GetTestJson("GrowthBookContext.NoFeatures"); | ||
|
||
var gb = JsonConvert.DeserializeObject<Context>(json); | ||
} | ||
|
||
[Fact] | ||
public void CreateFromJson_WithFeatures_ShouldSucceed() | ||
{ | ||
string json = JsonTestHelpers.GetTestJson("GrowthBookContext"); | ||
|
||
var gb = JsonConvert.DeserializeObject<Context>(json); | ||
} | ||
|
||
[Fact] | ||
public void CreateFeaturesFromJson_WithFeatures_ShouldSucceed() | ||
{ | ||
string json = JsonTestHelpers.GetTestJson("FeatureDictionary"); | ||
|
||
var gb = JsonConvert.DeserializeObject<Dictionary<string, Feature>>(json); | ||
} | ||
|
||
[Fact] | ||
public void CreateFeaturesFromJson_OneFeatureWithNameSpace_ShouldSucceed() | ||
{ | ||
string json = JsonTestHelpers.GetTestJson("SingleFeatureDictionary.WithNameSpace"); | ||
|
||
var gb = JsonConvert.DeserializeObject<Dictionary<string, Feature>>(json); | ||
} | ||
string json = JsonTestHelpers.GetTestJson("GrowthBookContext.NoFeatures"); | ||
_ = JsonConvert.DeserializeObject<Context>(json); | ||
} | ||
|
||
[Fact] | ||
public void CreateFromJson_WithFeatures_ShouldSucceed() | ||
{ | ||
string json = JsonTestHelpers.GetTestJson("GrowthBookContext"); | ||
_ = JsonConvert.DeserializeObject<Context>(json); | ||
} | ||
|
||
[Fact] | ||
public void CreateFeaturesFromJson_WithFeatures_ShouldSucceed() | ||
{ | ||
string json = JsonTestHelpers.GetTestJson("FeatureDictionary"); | ||
_ = JsonConvert.DeserializeObject<Dictionary<string, Feature>>(json); | ||
} | ||
|
||
[Fact] | ||
public void CreateFeaturesFromJson_OneFeatureWithNameSpace_ShouldSucceed() | ||
{ | ||
string json = JsonTestHelpers.GetTestJson("SingleFeatureDictionary.WithNameSpace"); | ||
_ = JsonConvert.DeserializeObject<Dictionary<string, Feature>>(json); | ||
} | ||
} |
Oops, something went wrong.