Nenhuma descrição
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

SkAdNetworkSourceTests.cs 1.2KB

1234567891011121314151617181920212223242526272829
  1. #if UNITY_2018_1_OR_NEWER && UNITY_IOS
  2. using System.IO;
  3. using System.Linq;
  4. using NUnit.Framework;
  5. namespace UnityEngine.Advertisements.Editor.Tests {
  6. public class SkAdNetworkSourceTests {
  7. [Test]
  8. [TestCase("ExpectedPath/To/File")]
  9. public void LocalSourcePathSetOnCreate(string expectedPath) {
  10. Assert.That(new SkAdNetworkLocalSource(expectedPath).Path, Is.EqualTo(expectedPath), "Path was not properly set in constructor");
  11. }
  12. [Test]
  13. [TestCase("ExpectedPath/To/File")]
  14. public void RemoteSourcePathSetOnCreate(string expectedPath) {
  15. Assert.That(new SkAdNetworkRemoteSource(expectedPath).Path, Is.EqualTo(expectedPath), "Path was not properly set in constructor");
  16. }
  17. [Test]
  18. [TestCase(SkAdNetworkFileExtension.XML, 0)]
  19. [TestCase(SkAdNetworkFileExtension.JSON, 0)]
  20. [TestCase(SkAdNetworkFileExtension.NONE, 1)]
  21. public void LocalSourceProviderFindsExpectedFiles(string extension, int expectedCount) {
  22. Assert.That(new SkAdNetworkLocalSourceProvider().GetSources("SKAdNetworks", extension).Count(), Is.EqualTo(expectedCount), "GetSources() did not return the expected count");
  23. }
  24. }
  25. }
  26. #endif