Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mikernet committed Mar 8, 2024
1 parent e918686 commit cba56ee
Show file tree
Hide file tree
Showing 37 changed files with 63 additions and 47 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;

public static partial class Add
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;

public static partial class Add
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;
public static partial class AddRange
{
[PrefixTestClass]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;

public static partial class AddRange
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;

public static partial class Clear
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;

public static partial class Clear
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;

[PrefixTestClass]
public class CollectionExpressions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;
public static class Contains
{
[PrefixTestClass]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;
public static class ContainsCurrency
{
[PrefixTestClass]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;
public static class Currencies
{
[PrefixTestClass]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests.ImmutableMoneySetTests;
namespace Singulink.Globalization.Tests.Sets.ImmutableMoneySetTests;

[PrefixTestClass]
public class Create
Expand All @@ -7,39 +7,47 @@ public class Create
private static readonly ImmutableArray<Money> SetValues = [Usd100, new(50m, "CAD"), new(25m, "EUR")];

[TestMethod]
public void Create_SingleValue()
public void SingleValue()
{
var set = ImmutableMoneySet.Create(Usd100);
set.Count.ShouldBe(1);
set.ShouldBe([Usd100]);
}

[TestMethod]
public void Create_EmptyArray()
public void SingleDefaultValue()
{
var set = ImmutableMoneySet.Create(Money.Default);
set.Count.ShouldBe(0);
set.ShouldBe([]);
}

[TestMethod]
public void EmptyArray()
{
var set = ImmutableMoneySet.Create(Array.Empty<Money>());
set.Count.ShouldBe(0);
set.ShouldBe([]);
}

[TestMethod]
public void Create_SomeDefaultValues_IgnoresDefaultValues()
public void SomeDefaultValues_IgnoresDefaultValues()
{
var set = ImmutableMoneySet.Create([default, ..SetValues, default]);
set.Count.ShouldBe(3);
set.ShouldBe(SetValues, ignoreOrder: true);
}

[TestMethod]
public void Create_ZeroValues_SkipsIfPresent()
public void ZeroValues_SkipsIfPresent()
{
var set = ImmutableMoneySet.Create([..SetValues, new(0m, "USD")]);
set.Count.ShouldBe(3);
set.ShouldBe(SetValues, ignoreOrder: true);
}

[TestMethod]
public void Create_MultipleSameCurrencyValues_AddsSameCurrencyValuesTogether()
public void MultipleSameCurrencyValues_AddsSameCurrencyValuesTogether()
{
var set = ImmutableMoneySet.Create([..SetValues, ..SetValues, ..SetValues]);
set.Count.ShouldBe(3);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests.ImmutableSortedMoneySetTests;
namespace Singulink.Globalization.Tests.Sets.ImmutableSortedMoneySetTests;

[PrefixTestClass]
public class Create
Expand All @@ -7,39 +7,47 @@ public class Create
private static readonly ImmutableArray<Money> SetValues = [Usd100, new(50m, "CAD"), new(25m, "EUR")];

[TestMethod]
public void Create_SingleValue()
public void SingleValue()
{
var set = ImmutableSortedMoneySet.Create(Usd100);
set.Count.ShouldBe(1);
set.ShouldBe([Usd100]);
}

[TestMethod]
public void Create_EmptyArray()
public void SingleDefaultValue()
{
var set = ImmutableSortedMoneySet.Create(Money.Default);
set.Count.ShouldBe(0);
set.ShouldBe([]);
}

[TestMethod]
public void EmptyArray()
{
var set = ImmutableSortedMoneySet.Create(Array.Empty<Money>());
set.Count.ShouldBe(0);
set.ShouldBe([]);
}

[TestMethod]
public void Create_SomeDefaultValues_IgnoresDefaultValues()
public void SomeDefaultValues_IgnoresDefaultValues()
{
var set = ImmutableSortedMoneySet.Create([default, ..SetValues, default]);
set.Count.ShouldBe(3);
set.ShouldBe(SetValues, ignoreOrder: true);
}

[TestMethod]
public void Create_ZeroValues_SkipsIfPresent()
public void ZeroValues_SkipsIfPresent()
{
var set = ImmutableSortedMoneySet.Create([..SetValues, new(0m, "USD")]);
set.Count.ShouldBe(3);
set.ShouldBe(SetValues, ignoreOrder: true);
}

[TestMethod]
public void Create_MultipleSameCurrencyValues_AddsSameCurrencyValuesTogether()
public void MultipleSameCurrencyValues_AddsSameCurrencyValuesTogether()
{
var set = ImmutableSortedMoneySet.Create([..SetValues, ..SetValues, ..SetValues]);
set.Count.ShouldBe(3);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;
public static class Indexers
{
[PrefixTestClass]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;

[PrefixTestClass]
public class IsSorted
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;

public static partial class Remove
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;

public static partial class Remove
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;

public static partial class RemoveAll
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;

public static partial class RemoveAll
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;

public static partial class RoundToCurrencyDigits
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;

public static partial class RoundToCurrencyDigits
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;

public static partial class SetAmount
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;

public static partial class SetAmount
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;

public static partial class SetValue
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;

public static partial class SetValue
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;

public static partial class Subtract
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;

public static partial class Subtract
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;

public static partial class SubtractRange
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;

public static partial class SubtractRange
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Globalization;

namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;

public static class ToString
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;

public static partial class TransformAmounts
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;

public static partial class TransformAmounts
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;

public static partial class TransformValues
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;

public static partial class TransformValues
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;

public static partial class TrimZeroAmounts
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;

public static partial class TrimZeroAmounts
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;

public static class TryGetAmount
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Singulink.Globalization.Tests.MoneySetTests;
namespace Singulink.Globalization.Tests.Sets;

public static class TryGetValue
{
Expand Down

0 comments on commit cba56ee

Please sign in to comment.