public void With_SimpleProperty_CreatesModifiedInstance() { const string NewName = "New Name"; var subject = new ItemCore.Builder().ToImmutable(); var newInstance = subject.WithName(NewName); Assert.Equal(NewName, newInstance.Name); }
public void With_SimpleProperty_DoesNotModifyInstance() { const string NewName = "New Name"; var subject = new ItemCore.Builder().ToImmutable(); subject.WithName(NewName); Assert.Null(subject.Name); }