public void OnAttachTo_WithNull_TargetSetToNull() { // Arrange var behavior = new TranslationBehaviour(); // Act behavior.CallOnAttachedTo(null); // Assert Assert.IsNull(behavior.Target); }
public void OnAttachTo_WithBindable_TargetSetToBindable() { // Arrange var testBindable = new TestBindableObject(); var behavior = new TranslationBehaviour(); // Act behavior.CallOnAttachedTo(testBindable); // Assert Assert.AreEqual(testBindable, behavior.Target); }
public void OnDetachingFrom_WithBindable_TargetSetToNull() { // Arrange var testBindable = new TestBindableObject(); var behavior = new TranslationBehaviour(); behavior.CallOnAttachedTo(testBindable); // Act behavior.CallOnDetachingFrom(testBindable); // Assert Assert.IsNull(behavior.Target); }