public void Sync_ShouldWorkWhenEnabled() { using (new SyncAnimalsAndLimbs()) { var animal = new Animal(); animal.Limbs.Count.Should().Be(0); new Limb("Front Left", animal); animal.Limbs.Count.Should().Be(1); new Limb("Front Right", animal); animal.Limbs.Count.Should().Be(2); } }
public Limb(string name, Animal animal) { Animal = new ReactiveProperty<Animal>(animal); Name = new ReactiveProperty<string>(name); this.Constructed(); }