public void WithResources_ShouldReturnResourceWithoutAddingResourcesToResourcesProperty_WhenNullPassed() { // Arrange var resource = new TestResource(); // Act var result = resource.WithResources(null); // Assert result.Should().BeSameAs(resource); result.Resources.Should().BeEmpty(); }
public void WithResources_WithParamsResources_ShouldAddResourceToResourcesPropertyAndReturnResource() { // Arrange var resource = new TestResource(); var childResource = new TestResource(); // Act var result = resource.WithResources(childResource); // Assert result.Should().BeSameAs(resource); result.Resources.Should().HaveCount(1); result.Resources.First().Should().BeSameAs(childResource); }