public void WithHeartbeatTimeout_returns_same_instance_if_value_is_equal() { var subject1 = new ServerSettings(); var subject2 = subject1.WithHeartbeatTimeout(subject1.HeartbeatTimeout); subject2.Should().BeSameAs(subject1); }
public void WithHeartbeatTimeout_returns_new_instance_if_value_is_not_equal() { var oldHeartbeatTimeout = TimeSpan.FromSeconds(1); var newHeartbeatTimeout = TimeSpan.FromSeconds(2); var subject1 = new ServerSettings().WithHeartbeatTimeout(oldHeartbeatTimeout); var subject2 = subject1.WithHeartbeatTimeout(newHeartbeatTimeout); subject2.Should().NotBeSameAs(subject1); subject2.HeartbeatTimeout.Should().Be(newHeartbeatTimeout); }
public void WithHeartbeatTimeout_returns_new_instance_if_value_is_not_equal() { var oldHeartbeatTimeout = TimeSpan.FromSeconds(1); var newHeartbeatTimeout = TimeSpan.FromSeconds(2); var subject1 = new ServerSettings().WithHeartbeatTimeout(oldHeartbeatTimeout); var subject2 = subject1.WithHeartbeatTimeout(newHeartbeatTimeout); subject2.Should().NotBeSameAs(subject1); subject2.HeartbeatTimeout.Should().Be(newHeartbeatTimeout); }
public void WithHeartbeatTimeout_returns_same_instance_if_value_is_equal() { var subject1 = new ServerSettings(); var subject2 = subject1.WithHeartbeatTimeout(subject1.HeartbeatTimeout); subject2.Should().BeSameAs(subject1); }