Skip to content

Commit e8ca3f4

Browse files
authored
Switch to file-scoped namespaces (#435)
1 parent 789b6e6 commit e8ca3f4

9 files changed

+595
-604
lines changed
Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,36 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using FluentAssertions;
44
using NUnit.Framework;
55
using Utilities.Extensions;
66

7-
namespace Utilities.Tests.Extensions
7+
namespace Utilities.Tests.Extensions;
8+
9+
public class DictionaryExtensionsTests
810
{
9-
public class DictionaryExtensionsTests
11+
[Test]
12+
public void AddMany_ShouldThrowArgumentException_WhenKeyAlreadyExists()
1013
{
11-
[Test]
12-
public void AddMany_ShouldThrowArgumentException_WhenKeyAlreadyExists()
13-
{
14-
var dictionary = new Dictionary<string, int> { ["one"] = 1 };
15-
var enumerable = new[] { ("one", 1), ("two", 2) };
14+
var dictionary = new Dictionary<string, int> { ["one"] = 1 };
15+
var enumerable = new[] { ("one", 1), ("two", 2) };
1616

17-
var action = () => dictionary.AddMany(enumerable);
17+
var action = () => dictionary.AddMany(enumerable);
1818

19-
action.Should().Throw<ArgumentException>();
20-
}
19+
action.Should().Throw<ArgumentException>();
20+
}
2121

22-
[Test]
23-
public void AddMany_ShouldAddAllKeyValuePairs()
24-
{
25-
var dictionary = new Dictionary<string, int> { ["one"] = 1 };
26-
var enumerable = new[] { ("two", 2), ("three", 3) };
22+
[Test]
23+
public void AddMany_ShouldAddAllKeyValuePairs()
24+
{
25+
var dictionary = new Dictionary<string, int> { ["one"] = 1 };
26+
var enumerable = new[] { ("two", 2), ("three", 3) };
2727

28-
dictionary.AddMany(enumerable);
28+
dictionary.AddMany(enumerable);
2929

30-
dictionary.Should().HaveCount(3);
30+
dictionary.Should().HaveCount(3);
3131

32-
dictionary.Should().ContainKey("one").WhichValue.Should().Be(1);
33-
dictionary.Should().ContainKey("two").WhichValue.Should().Be(2);
34-
dictionary.Should().ContainKey("three").WhichValue.Should().Be(3);
35-
}
32+
dictionary.Should().ContainKey("one").WhichValue.Should().Be(1);
33+
dictionary.Should().ContainKey("two").WhichValue.Should().Be(2);
34+
dictionary.Should().ContainKey("three").WhichValue.Should().Be(3);
3635
}
3736
}

0 commit comments

Comments
 (0)