public void WeCanSampleOnAPrivateField() { SampleTester<Vector3> test = new SampleTester<Vector3>(); Vector3Sampler sampler = new Vector3Sampler(test, "privateField", x, y, z); Vector3 oldValue = test.property; sampler.Sample(0.5f); Assert.That(test.GetPrivateField(), Is.Not.EqualTo(oldValue)); }
public void WeCanSampleOnAPrivateField() { SampleTester <Vector3> test = new SampleTester <Vector3>(); Vector3Sampler sampler = new Vector3Sampler(test, "privateField", x, y, z); Vector3 oldValue = test.property; sampler.Sample(0.5f); Assert.That(test.GetPrivateField(), Is.Not.EqualTo(oldValue)); }
public void WeCanChangeTheValueOfAPropertyOfAnObject() { SampleTester<Vector3> test = new SampleTester<Vector3>(); Vector3Sampler sampler = new Vector3Sampler(test, "property", x, y, z); Vector3 oldValue = test.property; sampler.Sample(0.5f); Assert.That(test.property, Is.Not.EqualTo(oldValue)); }
public void WeCanChangeTheValueOfAFieldOfAnObject() { SampleTester <Vector3> test = new SampleTester <Vector3>(); Vector3Sampler sampler = new Vector3Sampler(test, "field", x, y, z); Vector3 oldValue = test.property; sampler.Sample(0.5f); Assert.That(test.field, Is.Not.EqualTo(oldValue)); }
public void WeCanSampleWithFewerCurvesWithoutDestroyingExistingValues() { SampleTester <Vector3> test = new SampleTester <Vector3>() { property = new Vector3(3) }; Vector3Sampler sampler = new Vector3Sampler(test, "property", x, null, null); Vector3 oldValue = test.property; sampler.Sample(0.5f); Assert.That(test.property.x, Is.Not.EqualTo(oldValue.x)); Assert.That(test.property.y, Is.EqualTo(oldValue.y)); Assert.That(test.property.z, Is.EqualTo(oldValue.z)); }
public void WeCanSampleWithFewerCurvesWithoutDestroyingExistingValues() { SampleTester<Vector3> test = new SampleTester<Vector3>() { property = new Vector3(3) }; Vector3Sampler sampler = new Vector3Sampler(test, "property", x, null, null); Vector3 oldValue = test.property; sampler.Sample(0.5f); Assert.That(test.property.x, Is.Not.EqualTo(oldValue.x)); Assert.That(test.property.y, Is.EqualTo(oldValue.y)); Assert.That(test.property.z, Is.EqualTo(oldValue.z)); }