Esempio n. 1
0
        public void AddResources_ShouldNotAddResourcesToResourcesProperty_WhenNullPassed()
        {
            // Arrange
            var resource = new TestResource();

            // Act
            resource.AddResources(null);

            // Assert
            resource.Resources.Should().BeEmpty();
        }
Esempio n. 2
0
        public void AddResources_ShouldAddResourcesToResourcesProperty()
        {
            // Arrange
            var resource      = new TestResource();
            var childResource = new TestResource();

            // Act
            resource.AddResources(new[] { childResource });

            // Assert
            resource.Resources.Should().HaveCount(1);
            resource.Resources.First().Should().BeSameAs(childResource);
        }