public void FbxObject_SetInitialName_SetsInitialNameAndName() { // given: var obj = new FbxObject("asdf"); // require: Assert.AreEqual("asdf", obj.GetInitialName()); Assert.AreEqual("asdf", obj.GetName()); // when: obj.SetInitialName("qwer"); // then: Assert.AreEqual("qwer", obj.GetInitialName()); Assert.AreEqual("qwer", obj.GetName()); }
public void FbxObject_GetName_GetsName() { // given: var obj = new FbxObject("asdf"); // then: Assert.AreEqual("asdf", obj.GetName()); }
public void FbxObject_SetNameSpaceThenSetInitialName_FirstCharacterIsStillMissing() { // given: var obj = new FbxObject("asdf"); obj.SetNameSpace("qwer"); // require: Assert.AreEqual("asdf", obj.GetName()); Assert.AreEqual("qwer", obj.GetNameSpaceOnly()); // when: obj.SetInitialName("zxcv"); // then: Assert.AreEqual("zxcv", obj.GetInitialName()); Assert.AreEqual("zxcv", obj.GetName()); Assert.AreEqual("xcv", obj.GetNameOnly()); }
public void FbxObject_SetName_SetsName() { // given: var obj = new FbxObject("asdf"); // when: obj.SetName("qwer"); // then: Assert.AreEqual("qwer", obj.GetName()); }
public void FbxObject_GetNameWithoutNameSpacePrefix_GetsNameWithNamespacePrefix() { // given: var obj = new FbxObject("asdf"); // require: Assert.AreEqual("asdf", obj.GetName()); // then: Assert.AreEqual("asdf", obj.GetNameWithNameSpacePrefix()); }
public void FbxObject_Create_SetsInitialName() { // given: var obj = new FbxObject("asdf"); // require: Assert.AreEqual("asdf", obj.GetName()); // then: Assert.AreEqual("asdf", obj.GetInitialName()); }
public void FbxObject_SetNameSpaceAndGetNameWithoutNameSpacePrefix_IncludesNamespace() { // given: var obj = new FbxObject("asdf"); obj.SetNameSpace("qwer"); // require: Assert.AreEqual("asdf", obj.GetName()); Assert.AreEqual("qwer", obj.GetNameSpaceOnly()); // then: Assert.AreEqual("asdf", obj.GetNameWithNameSpacePrefix()); }
public void FbxObject_SetNameSpaceAndGetNameWithoutNameSpacePrefix_FirstCharacterIsNotMissing() { // given: var obj = new FbxObject("asdf"); obj.SetNameSpace("qwer"); // require: Assert.AreEqual("asdf", obj.GetName()); Assert.AreEqual("qwer", obj.GetNameSpaceOnly()); // then: Assert.AreEqual("asdf", obj.GetNameWithoutNameSpacePrefix()); }
protected override void CheckScene(FbxScene scene) { FbxScene origScene = CreateScene(FbxManager); Assert.That(origScene.GetRootNode().GetChildCount(), Is.EqualTo(scene.GetRootNode().GetChildCount())); // check nodes match FbxNode origSourceNode = origScene.GetRootNode().GetChild(0); FbxNode origConstrainedNode = origScene.GetRootNode().GetChild(1); FbxNode importSourceNode = scene.GetRootNode().GetChild(0); FbxNode importConstrainedNode = scene.GetRootNode().GetChild(1); Assert.That(origSourceNode, Is.Not.Null); Assert.That(importSourceNode, Is.Not.Null); Assert.That(origConstrainedNode, Is.Not.Null); Assert.That(importConstrainedNode, Is.Not.Null); Assert.That(importSourceNode.GetName(), Is.EqualTo(origSourceNode.GetName())); Assert.That(importConstrainedNode.GetName(), Is.EqualTo(origConstrainedNode.GetName())); // check constraints match // TODO: find a way to cast to FbxConstraint Assert.That(scene.GetSrcObjectCount(), Is.EqualTo(origScene.GetSrcObjectCount())); FbxObject origPosConstraint = origScene.FindSrcObject(ConstraintName); FbxObject importPosConstraint = scene.FindSrcObject(ConstraintName); Assert.That(origPosConstraint, Is.Not.Null); Assert.That(importPosConstraint, Is.Not.Null); Assert.That(importPosConstraint.GetName(), Is.EqualTo(origPosConstraint.GetName())); // check animation matches FbxAnimStack origStack = origScene.GetCurrentAnimationStack(); FbxAnimStack importStack = scene.GetCurrentAnimationStack(); CheckAnimStack(origStack, importStack); FbxAnimLayer origLayer = origStack.GetAnimLayerMember(); FbxAnimLayer importLayer = importStack.GetAnimLayerMember(); Assert.That(origLayer, Is.Not.Null); Assert.That(importLayer, Is.Not.Null); Assert.That(scene.GetGlobalSettings().GetTimeMode(), Is.EqualTo(FbxTime.EMode.eFrames30)); CheckAnimCurve(origPosConstraint, importPosConstraint, origLayer, importLayer, PropertyComponentList); }