Skip to content

Commit 10effc7

Browse files
committed
Removing unneeded bags
1 parent 0fa28ad commit 10effc7

2 files changed

Lines changed: 1 addition & 22 deletions

File tree

NTestDataBuilder.Tests/GetAnonymousTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class GetAnonymousTests
1111
[SetUp]
1212
public void Setup()
1313
{
14-
AnonymousValueFixture.ClearGlobalState();
14+
AnonymousValueFixture.GlobalValueSuppliers.Clear();
1515
_b = new BasicCustomerBuilder();
1616
}
1717

NTestDataBuilder/AnonymousValueFixture.cs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ public class AnonymousValueFixture
1616
{
1717
static AnonymousValueFixture()
1818
{
19-
GlobalFixtureBag = new ExpandoObject();
2019
GlobalValueSuppliers = new List<IAnonymousValueSupplier>();
2120
DefaultValueSuppliers = new IAnonymousValueSupplier[]
2221
{
@@ -30,7 +29,6 @@ static AnonymousValueFixture()
3029
/// </summary>
3130
public AnonymousValueFixture()
3231
{
33-
LocalFixtureBag = new ExpandoObject();
3432
LocalValueSuppliers = new List<IAnonymousValueSupplier>();
3533
Fixture = new Fixture();
3634
}
@@ -41,16 +39,6 @@ public AnonymousValueFixture()
4139
/// </summary>
4240
public Fixture Fixture { get; private set; }
4341

44-
/// <summary>
45-
/// Dynamic value store in case anonymous suppliers need to store global state.
46-
/// </summary>
47-
public static dynamic GlobalFixtureBag { get; private set; }
48-
49-
/// <summary>
50-
/// Dynamic value store in case anonymous suppliers need to store fixture-specific state.
51-
/// </summary>
52-
public dynamic LocalFixtureBag { get; private set; }
53-
5442
/// <summary>
5543
/// Ordered, immutable collection of default anonymous value suppliers to interrogate when automatically generating an anonymous value.
5644
/// These have the lowest priority and are a fallback if there are no local or global value suppliers that apply.
@@ -86,14 +74,5 @@ public T Get<TObject, T>(Expression<Func<TObject, T>> property)
8674

8775
return valueSupplier.GenerateAnonymousValue<TObject, T>(this, propertyName);
8876
}
89-
90-
/// <summary>
91-
/// Clears all global state.
92-
/// </summary>
93-
public static void ClearGlobalState()
94-
{
95-
GlobalValueSuppliers.Clear();
96-
GlobalFixtureBag = new ExpandoObject();
97-
}
9877
}
9978
}

0 commit comments

Comments
 (0)