FbxIOBaseTest.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. // ***********************************************************************
  2. // Copyright (c) 2017 Unity Technologies. All rights reserved.
  3. //
  4. // Licensed under the ##LICENSENAME##.
  5. // See LICENSE.md file in the project root for full license information.
  6. // ***********************************************************************
  7. using NUnit.Framework;
  8. using System.Collections;
  9. using Autodesk.Fbx;
  10. namespace Autodesk.Fbx.UnitTests
  11. {
  12. public class FbxIOBaseTest<T> : Base<T> where T: FbxIOBase
  13. {
  14. [Test]
  15. public virtual void TestBasics()
  16. {
  17. using (var iobase = CreateObject()) { iobase.Initialize("/no/such/file.fbx"); }
  18. using (var iobase = CreateObject()) { iobase.Initialize("/no/such/file.fbx", -1); }
  19. using (var iobase = CreateObject()) { iobase.Initialize("/no/such/file.fbx", -1, FbxIOSettings.Create(Manager, "")); }
  20. using (var iobase = CreateObject()) { iobase.Initialize("/no/such/file.fbx", -1, null); }
  21. using (var iobase = CreateObject()) {
  22. Assert.IsFalse(iobase.GetStatus().Error());
  23. iobase.Initialize("/no/such/file.fbx");
  24. Assert.AreEqual("/no/such/file.fbx", iobase.GetFileName());
  25. }
  26. }
  27. }
  28. public class FbxIOBaseTestClass : FbxIOBaseTest<FbxIOBase> { }
  29. }