ParseArgumentsTest.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using NUnit.Framework;
  2. using System.Collections.Generic;
  3. using Unity.PlasticSCM.Editor.ProjectDownloader;
  4. namespace Unity.PlasticSCM.Tests.Editor.ProjectDownloader
  5. {
  6. [TestFixture]
  7. class ParseArgumentsTest
  8. {
  9. [Test]
  10. public void TestParseCloudProject()
  11. {
  12. Dictionary<string, string> args = new Dictionary<string, string>();
  13. args.Add("-cloudProject", "fpsmicrogame");
  14. Assert.AreEqual("fpsmicrogame", ParseArguments.CloudProject(args));
  15. }
  16. [Test]
  17. public void TestParseCloudOrganization()
  18. {
  19. Dictionary<string, string> args = new Dictionary<string, string>();
  20. args.Add("-cloudOrganization", "D51E18A1-CA04-4E7C-A649-6FD2829E3223-danipen-unity");
  21. Assert.AreEqual("danipen-unity", ParseArguments.CloudOrganization(args));
  22. }
  23. [Test]
  24. public void TestParseProjectPath()
  25. {
  26. Dictionary<string, string> args = new Dictionary<string, string>();
  27. args.Add("-createProject", @"c:\tmp\newproj");
  28. Assert.AreEqual(@"c:\tmp\newproj", ParseArguments.ProjectPath(args));
  29. }
  30. }
  31. }