mirror of
https://github.com/imperialsushi/gutterball-3.git
synced 2025-06-15 05:07:42 +00:00
New Version 1.42
Moving cam replay. Fixed the bugs. New Version 1.42 Moving cam replay. Fixed the bugs. New Version 1.42 Moving cam replay, Fixed the bugs.
This commit is contained in:
parent
dcb7df5fd1
commit
1c033119df
7079 changed files with 186851 additions and 48991 deletions
|
@ -0,0 +1,57 @@
|
|||
## [3.2.2] - 2018-11-02
|
||||
- Removed FetchOptOutStatus and Initialize call. All application of opt out
|
||||
status will be handled by the engine. The Analytics/Data Privacy package still
|
||||
provides FetchPrivacyUrl to provide a URL from which to opt out.
|
||||
|
||||
## [3.2.1] - 2018-10-25
|
||||
- Move editor and playmode tests to be packed within the package.
|
||||
|
||||
## [3.2.0] - 2018-10-11
|
||||
- Prevent double-registration of standard events.
|
||||
- Fixed build error on platforms that don't support analytics.
|
||||
- Update package docs so they can be built and published and be accessible from
|
||||
the Package Manager UI.
|
||||
- Fixed a crash occurring on iOS device when the device has cellular capability
|
||||
but was never configured with any carrier service.
|
||||
- Fixed an android build failure occurring due to conflicting install referrer
|
||||
AIDL files.
|
||||
|
||||
## [3.1.1] - 2018-08-21
|
||||
- Add DataPrivacy plugin into package.
|
||||
- Fixed an issue where Android project build would fail when proguard is enabled
|
||||
in publishing settings.
|
||||
- Fixed an issue where iOS product archive would fail because bitcode was not
|
||||
enabled.
|
||||
|
||||
## [3.0.9] - 2018-07-31
|
||||
- Fixing issue with NullReferenceException during editor playmode
|
||||
|
||||
## [3.0.8] - 2018-07-26
|
||||
- Fixing linking issue when building Android il2cpp
|
||||
|
||||
## [3.0.7] - 2018-07-10
|
||||
- Adding in continuous events for signal strength, battery level, battery
|
||||
temperature, memory usage, available storage
|
||||
|
||||
## [3.0.6] - 2018-06-01
|
||||
- Reorganizing platformInfo event around session start/resume/pause
|
||||
|
||||
## [3.0.5] - 2018-05-29
|
||||
- Fixing cellular signal strength incorrect array format
|
||||
|
||||
## [3.0.4] - 2018-05-04
|
||||
- Breaking change to only work with 2018.2 (change name of whitelisted dll's in
|
||||
engine to conform to PackageManager standard)
|
||||
- Changed name of old Analytics dll to the Unity.Analytics.Tracker.dll and
|
||||
replaced the old one with the new platform information package.
|
||||
- Changed naming convention of dlls to the PackageManager Standard:
|
||||
Unity.Analytics.dll, Unity.Analytics.Editor.dll, Unity.Analytics.Tracker.dll,
|
||||
Unity.Analytics.StandardEvents.dll.
|
||||
- Deprecated old Analytics tracker and removed it from the add component menu.
|
||||
- Merged Standardevents package into Analytics package.
|
||||
|
||||
## [2.0.14] - 2018-02-08
|
||||
- Added proper documentation and better description text.
|
||||
|
||||
## [2.0.5] -
|
||||
- Update analytics tracker to 2.0 (1.0 version is still available)
|
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: bcd27da1c9ae94d2cafe094482a20792
|
||||
timeCreated: 1511216857
|
||||
licenseType: Pro
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8aafd27f78c12564281bac0d0067df8d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,4 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
|
||||
[assembly: InternalsVisibleTo("Unity.Analytics.DataPrivacy.Tests")]
|
||||
[assembly: InternalsVisibleTo("Unity.Analytics.DataPrivacy.WebRequest.Tests")]
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7aad9e80c95b4991a1f4d017c8caf386
|
||||
timeCreated: 1526477558
|
|
@ -0,0 +1,132 @@
|
|||
#if ENABLE_CLOUD_SERVICES_ANALYTICS
|
||||
using System;
|
||||
using System.Text;
|
||||
using UnityEngine.Networking;
|
||||
|
||||
namespace UnityEngine.Analytics
|
||||
{
|
||||
public class DataPrivacy
|
||||
{
|
||||
[Serializable]
|
||||
internal struct UserPostData
|
||||
{
|
||||
public string appid;
|
||||
public string userid;
|
||||
public long sessionid;
|
||||
public string platform;
|
||||
public UInt32 platformid;
|
||||
public string sdk_ver;
|
||||
public bool debug_device;
|
||||
public string deviceid;
|
||||
public string plugin_ver;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
internal struct TokenData
|
||||
{
|
||||
public string url;
|
||||
public string token;
|
||||
}
|
||||
|
||||
const string kVersion = "3.0.0";
|
||||
const string kVersionString = "DataPrivacyPackage/" + kVersion;
|
||||
|
||||
internal const string kBaseUrl = "https://data-optout-service.uca.cloud.unity3d.com";
|
||||
const string kTokenUrl = kBaseUrl + "/token";
|
||||
|
||||
internal static UserPostData GetUserData()
|
||||
{
|
||||
var postData = new UserPostData
|
||||
{
|
||||
appid = Application.cloudProjectId,
|
||||
userid = AnalyticsSessionInfo.userId,
|
||||
sessionid = AnalyticsSessionInfo.sessionId,
|
||||
platform = Application.platform.ToString(),
|
||||
platformid = (UInt32)Application.platform,
|
||||
sdk_ver = Application.unityVersion,
|
||||
debug_device = Debug.isDebugBuild,
|
||||
deviceid = SystemInfo.deviceUniqueIdentifier,
|
||||
plugin_ver = kVersionString
|
||||
};
|
||||
|
||||
return postData;
|
||||
}
|
||||
|
||||
static string GetUserAgent()
|
||||
{
|
||||
var message = "UnityPlayer/{0} ({1}/{2}{3} {4})";
|
||||
return String.Format(message,
|
||||
Application.unityVersion,
|
||||
Application.platform.ToString(),
|
||||
(UInt32)Application.platform,
|
||||
Debug.isDebugBuild ? "-dev" : "",
|
||||
kVersionString);
|
||||
}
|
||||
|
||||
static String getErrorString(UnityWebRequest www)
|
||||
{
|
||||
var json = www.downloadHandler.text;
|
||||
var error = www.error;
|
||||
if (String.IsNullOrEmpty(error))
|
||||
{
|
||||
// 5.5 sometimes fails to parse an error response, and the only clue will be
|
||||
// in www.responseHeadersString, which isn't accessible.
|
||||
error = "Empty response";
|
||||
}
|
||||
|
||||
if (!String.IsNullOrEmpty(json))
|
||||
{
|
||||
error += ": " + json;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
public static void FetchPrivacyUrl(Action<string> success, Action<string> failure = null)
|
||||
{
|
||||
string postJson = JsonUtility.ToJson(GetUserData());
|
||||
byte[] bytes = Encoding.UTF8.GetBytes(postJson);
|
||||
var uploadHandler = new UploadHandlerRaw(bytes);
|
||||
uploadHandler.contentType = "application/json";
|
||||
|
||||
var www = UnityWebRequest.Post(kTokenUrl, "");
|
||||
www.uploadHandler = uploadHandler;
|
||||
#if !UNITY_WEBGL
|
||||
www.SetRequestHeader("User-Agent", GetUserAgent());
|
||||
#endif
|
||||
var async = www.SendWebRequest();
|
||||
|
||||
async.completed += (AsyncOperation async2) =>
|
||||
{
|
||||
var json = www.downloadHandler.text;
|
||||
if (!String.IsNullOrEmpty(www.error) || String.IsNullOrEmpty(json))
|
||||
{
|
||||
var error = getErrorString(www);
|
||||
if (failure != null)
|
||||
{
|
||||
failure(error);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
TokenData tokenData;
|
||||
tokenData.url = ""; // Just to quell "possibly unassigned" error
|
||||
try
|
||||
{
|
||||
tokenData = JsonUtility.FromJson<TokenData>(json);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
if (failure != null)
|
||||
{
|
||||
failure(e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
success(tokenData.url);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif //ENABLE_CLOUD_SERVICES_ANALYTICS
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: bff25ea4cf0d3d841b6787b9f649f21b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,52 @@
|
|||
#if ENABLE_CLOUD_SERVICES_ANALYTICS
|
||||
using System;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace UnityEngine.Analytics
|
||||
{
|
||||
public class DataPrivacyButton : Button
|
||||
{
|
||||
bool urlOpened = false;
|
||||
|
||||
DataPrivacyButton()
|
||||
{
|
||||
onClick.AddListener(OpenDataPrivacyUrl);
|
||||
}
|
||||
|
||||
void OnFailure(string reason)
|
||||
{
|
||||
interactable = true;
|
||||
Debug.LogWarning(String.Format("Failed to get data privacy url: {0}", reason));
|
||||
}
|
||||
|
||||
void OpenUrl(string url)
|
||||
{
|
||||
interactable = true;
|
||||
urlOpened = true;
|
||||
|
||||
#if UNITY_WEBGL && !UNITY_EDITOR
|
||||
Application.ExternalEval("window.open(\"" + url + "\",\"_blank\")");
|
||||
#else
|
||||
Application.OpenURL(url);
|
||||
#endif
|
||||
}
|
||||
|
||||
void OpenDataPrivacyUrl()
|
||||
{
|
||||
interactable = false;
|
||||
DataPrivacy.FetchPrivacyUrl(OpenUrl, OnFailure);
|
||||
}
|
||||
|
||||
void OnApplicationFocus(bool hasFocus)
|
||||
{
|
||||
if (hasFocus && urlOpened)
|
||||
{
|
||||
urlOpened = false;
|
||||
// Immediately refresh the remote config so new privacy settings can be enabled
|
||||
// as soon as possible if they have changed.
|
||||
RemoteSettings.ForceUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif //ENABLE_CLOUD_SERVICES_ANALYTICS
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a5ebb11c6fc3a2f498bd89593f7744aa
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,246 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &109074
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 4
|
||||
m_Component:
|
||||
- 224: {fileID: 22409074}
|
||||
- 222: {fileID: 22209074}
|
||||
- 114: {fileID: 11409072}
|
||||
m_Layer: 5
|
||||
m_Name: Image
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &109076
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 4
|
||||
m_Component:
|
||||
- 224: {fileID: 22409076}
|
||||
- 222: {fileID: 22209076}
|
||||
- 114: {fileID: 11409074}
|
||||
- 114: {fileID: 11409076}
|
||||
m_Layer: 5
|
||||
m_Name: DataPrivacyButton
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &109078
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 4
|
||||
m_Component:
|
||||
- 224: {fileID: 22409078}
|
||||
- 222: {fileID: 22209078}
|
||||
- 114: {fileID: 11409078}
|
||||
m_Layer: 0
|
||||
m_Name: Text
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &11409072
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 109074}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: .196078405, g: .196078405, b: .196078405, a: 1}
|
||||
m_Sprite: {fileID: 21300000, guid: 599a5fd92bab81a4ab02e52d0b1b1c60, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
--- !u!114 &11409074
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 109076}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
--- !u!114 &11409076
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 109076}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a5ebb11c6fc3a2f498bd89593f7744aa, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1}
|
||||
m_PressedColor: {r: .784313738, g: .784313738, b: .784313738, a: 1}
|
||||
m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: .100000001
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 11409074}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
--- !u!114 &11409078
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 109078}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: .196078405, g: .196078405, b: .196078405, a: 1}
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 14
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 4
|
||||
m_RichText: 0
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: Open Data Privacy Page
|
||||
--- !u!222 &22209074
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 109074}
|
||||
--- !u!222 &22209076
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 109076}
|
||||
--- !u!222 &22209078
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 109078}
|
||||
--- !u!224 &22409074
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 109074}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 22409076}
|
||||
m_RootOrder: 1
|
||||
m_AnchorMin: {x: 1, y: .5}
|
||||
m_AnchorMax: {x: 1, y: .5}
|
||||
m_AnchoredPosition: {x: -8, y: 0}
|
||||
m_SizeDelta: {x: 20, y: 20}
|
||||
m_Pivot: {x: 1, y: .5}
|
||||
--- !u!224 &22409076
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 109076}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 22409078}
|
||||
- {fileID: 22409074}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_AnchorMin: {x: .5, y: .5}
|
||||
m_AnchorMax: {x: .5, y: .5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 200, y: 30}
|
||||
m_Pivot: {x: .5, y: .5}
|
||||
--- !u!224 &22409078
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 109078}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 22409076}
|
||||
m_RootOrder: 0
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: .850000024, y: 1}
|
||||
m_AnchoredPosition: {x: 8, y: 0}
|
||||
m_SizeDelta: {x: -12, y: 0}
|
||||
m_Pivot: {x: 0, y: .5}
|
||||
--- !u!1001 &100100000
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 1
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications: []
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 0}
|
||||
m_RootGameObject: {fileID: 109076}
|
||||
m_IsPrefabParent: 1
|
||||
m_IsExploded: 1
|
|
@ -0,0 +1,4 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 71b11355001648444b41d17fd36c150d
|
||||
NativeFormatImporter:
|
||||
userData:
|
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
|
@ -0,0 +1,48 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 599a5fd92bab81a4ab02e52d0b1b1c60
|
||||
TextureImporter:
|
||||
fileIDToRecycleName:
|
||||
664227380: ImportLogs
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 256
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: 16
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 8
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"name": "Unity.Analytics.DataPrivacy",
|
||||
"references": [],
|
||||
"optionalUnityReferences": [],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0fda7ebe61ab2164383d10e32efb9c6e
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,51 @@
|
|||
# About the Analytics Package
|
||||
|
||||
This Analytics package supports the following Unity Analytics features:
|
||||
|
||||
* [Standard Events](https://docs.unity3d.com/Manual/UnityAnalyticsStandardEvents.html)
|
||||
* [Analytics Event Tracker](https://docs.unity3d.com/Manual/class-AnalyticsEventTracker.html)
|
||||
* [Unity Analytics Data Privacy Plug-in](https://docs.unity3d.com/Manual/UnityAnalyticsDataPrivacy.html)
|
||||
|
||||
For instructions on using the features in the Analytics package, refer to the [Analytics section of
|
||||
the Unity Manual](https://docs.unity3d.com/Manual/UnityAnalytics.html).
|
||||
|
||||
The package is supported by Unity 2018.3+ and includes functionality previously included in
|
||||
earlier Unity Asset Store and Package Manager packages. When upgrading existing projects to
|
||||
2018.3 or later, older, redundant packages should be removed from the project.
|
||||
|
||||
|
||||
## Installing the Analytics Package
|
||||
|
||||
The Analytics package is built into the Unity Editor and enabled automatically. Use the Unity
|
||||
Package Manager (menu: **Window** > **Package Manager**) to disable or enable the package.
|
||||
The Analytics package is listed under the built-in packages.
|
||||
|
||||
|
||||
<a name="UsingAnalytics"></a>
|
||||
## Using the Analytics Package
|
||||
|
||||
For instructions on using the features in the Analytics package, refer to the Unity Manual:
|
||||
|
||||
* [Standard Events](https://docs.unity3d.com/Manual/UnityAnalyticsStandardEvents.html)
|
||||
* [Analytics Event Tracker](https://docs.unity3d.com/Manual/class-AnalyticsEventTracker.html)
|
||||
* [Unity Analytics Data Privacy Plug-in](https://docs.unity3d.com/Manual/UnityAnalyticsDataPrivacy.html)
|
||||
|
||||
|
||||
## Package contents
|
||||
|
||||
The following table indicates the major classes, components, and files included in the Analytics package:
|
||||
|
||||
|Item|Description|
|
||||
|---|---|
|
||||
|[`AnalyticsEvent` class](https://docs.unity3d.com/2018.3/Documentation/ScriptReference/Analytics.AnalyticsEvent.html) | The primary class for sending Standard and Custom analytics events to the Unity Analytics service.|
|
||||
|[Analytics Event Tracker component](https://docs.unity3d.com/Manual/class-AnalyticsEventTracker.html) | A Unity component that you can use to send Standard and Custom analytics events (without writing code).|
|
||||
|[DataPrivacy class](https://docs.unity3d.com/Manual/UnityAnalyticsDataPrivacyAPI.html)| A utility class that helps applications using Unity Analytics comply with the EU General Data Protection Regulation (GDPR).|
|
||||
|`Packages/Analytics Library/DataPrivacy/DataPrivacyButton`| A Prefab GameObject you can use when building a user interface to allow players to opt out of Analytics data collection.|
|
||||
|`Packages/Analytics Library/DataPrivacy/DataPrivacyIcon`| An icon graphic you can use when creating your own opt-out button or control.|
|
||||
|
||||
|
||||
## Document revision history
|
||||
|
||||
|Date|Reason|
|
||||
|---|---|
|
||||
|October 5, 2018|Document created. Matches package version 3.2.0.|
|
|
@ -0,0 +1,10 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7fd5e77e7e7ea4eea8198138cd9cc814
|
||||
folderAsset: yes
|
||||
timeCreated: 1491256195
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
|
@ -0,0 +1,57 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5e7c9ab97e5884e4eaa5967e9024f39d
|
||||
timeCreated: 1492409422
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 7
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -3
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 2
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,32 @@
|
|||
**Unity Companion Package License v1.0 ("_License_")**
|
||||
|
||||
Copyright © 2017 Unity Technologies ApS ("**_Unity_**")
|
||||
|
||||
Unity hereby grants to you a worldwide, non-exclusive, no-charge, and royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute the software that is made available with this License ("**_Software_**"), subject to the following terms and conditions:
|
||||
|
||||
1. *Unity Companion Use Only*. Exercise of the license granted herein is limited to exercise for the creation, use, and/or distribution of applications, software, or other content pursuant to a valid Unity development engine software license ("**_Engine License_**"). That means while use of the Software is not limited to use in the software licensed under the Engine License, the Software may not be used for any purpose other than the creation, use, and/or distribution of Engine License-dependent applications, software, or other content. No other exercise of the license granted herein is permitted.
|
||||
|
||||
1. *No Modification of Engine License*. Neither this License nor any exercise of the license granted herein modifies the Engine License in any way.
|
||||
|
||||
1. *Ownership & Grant Back to You*.
|
||||
|
||||
3.1. You own your content. In this License, "derivative works" means derivatives of the Software itself--works derived only from the Software by you under this License (for example, modifying the code of the Software itself to improve its efficacy); “derivative works” of the Software do not include, for example, games, apps, or content that you create using the Software. You keep all right, title, and interest to your own content.
|
||||
|
||||
3.2. Unity owns its content. While you keep all right, title, and interest to your own content per the above, as between Unity and you, Unity will own all right, title, and interest to all intellectual property rights (including patent, trademark, and copyright) in the Software and derivative works of the Software, and you hereby assign and agree to assign all such rights in those derivative works to Unity.
|
||||
|
||||
3.3. You have a license to those derivative works. Subject to this License, Unity grants to you the same worldwide, non-exclusive, no-charge, and royalty-free copyright license to derivative works of the Software you create as is granted to you for the Software under this License.
|
||||
|
||||
1. *Trademarks*. You are not granted any right or license under this License to use any trademarks, service marks, trade names, products names, or branding of Unity or its affiliates ("**_Trademarks_**"). Descriptive uses of Trademarks are permitted; see, for example, Unity’s Branding Usage Guidelines at [https://unity3d.com/public-relations/brand](https://unity3d.com/public-relations/brand).
|
||||
|
||||
1. *Notices & Third-Party Rights*. This License, including the copyright notice above, must be provided in all substantial portions of the Software and derivative works thereof (or, if that is impracticable, in any other location where such notices are customarily placed). Further, if the Software is accompanied by a Unity "third-party notices" or similar file, you acknowledge and agree that software identified in that file is governed by those separate license terms.
|
||||
|
||||
1. *DISCLAIMER, LIMITATION OF LIABILITY*. THE SOFTWARE AND ANY DERIVATIVE WORKS THEREOF IS PROVIDED ON AN "AS IS" BASIS, AND IS PROVIDED WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND/OR NONINFRINGEMENT. IN NO EVENT SHALL ANY COPYRIGHT HOLDER OR AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES (WHETHER DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL, INCLUDING PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF USE, DATA, OR PROFITS, AND BUSINESS INTERRUPTION), OR OTHER LIABILITY WHATSOEVER, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM OR OUT OF, OR IN CONNECTION WITH, THE SOFTWARE OR ANY DERIVATIVE WORKS THEREOF OR THE USE OF OR OTHER DEALINGS IN SAME, EVEN WHERE ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
1. *USE IS ACCEPTANCE and License Versions*. Your receipt and use of the Software constitutes your acceptance of this License and its terms and conditions. Software released by Unity under this License may be modified or updated and the License with it; upon any such modification or update, you will comply with the terms of the updated License for any use of any of the Software under the updated License.
|
||||
|
||||
1. *Use in Compliance with Law and Termination*. Your exercise of the license granted herein will at all times be in compliance with applicable law and will not infringe any proprietary rights (including intellectual property rights); this License will terminate immediately on any breach by you of this License.
|
||||
|
||||
1. *Severability*. If any provision of this License is held to be unenforceable or invalid, that provision will be enforced to the maximum extent possible and the other provisions will remain in full force and effect.
|
||||
|
||||
1. *Governing Law and Venue*. This License is governed by and construed in accordance with the laws of Denmark, except for its conflict of laws rules; the United Nations Convention on Contracts for the International Sale of Goods will not apply. If you reside (or your principal place of business is) within the United States, you and Unity agree to submit to the personal and exclusive jurisdiction of and venue in the state and federal courts located in San Francisco County, California concerning any dispute arising out of this License ("**_Dispute_**"). If you reside (or your principal place of business is) outside the United States, you and Unity agree to submit to the personal and exclusive jurisdiction of and venue in the courts located in Copenhagen, Denmark concerning any Dispute.
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 15bf9c691b85b41a39c18bee2f87e21b
|
||||
timeCreated: 1504642560
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,14 @@
|
|||
Unity Analytics: Tracker
|
||||
------------------------------
|
||||
Please visit the following URL to see documentation for the Analytics Event Tracker.
|
||||
|
||||
https://docs.google.com/document/d/1glh4zEk0KQ_FhOgk95H-VOubcdzrVGyu5BYCmhFQCh0/edit#
|
||||
|
||||
Please note, the documentation at this URL is considered a "living" document and subject to change.
|
||||
|
||||
|
||||
Unity Analytics: Standard Events
|
||||
------------------------------
|
||||
Track player behavior specific to your game
|
||||
|
||||
Standard Events are a set of curated custom events focused on player experience.
|
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 884f8f0e4025a420893d3a8d1d3063e1
|
||||
timeCreated: 1511217314
|
||||
licenseType: Pro
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7a573b834e2608c4f982daf527bdb47a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"createSeparatePackage": false
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 931f3395378214a6c94333853bd0659b
|
||||
folderAsset: yes
|
||||
timeCreated: 1489179043
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b6295675042094715ad9cc104210aeb7
|
||||
folderAsset: yes
|
||||
timeCreated: 1489733951
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,48 @@
|
|||
using System;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void AchievementStep_StepIndexTest(
|
||||
[Values(-1, 0, 1)] int stepIndex
|
||||
)
|
||||
{
|
||||
var achievementId = "unit_tester";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AchievementStep(stepIndex, achievementId));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AchievementStep_AchievementIdTest(
|
||||
[Values("unit_tester", "", null)] string achievementId
|
||||
)
|
||||
{
|
||||
var stepIndex = 0;
|
||||
|
||||
if (string.IsNullOrEmpty(achievementId))
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => AnalyticsEvent.AchievementStep(stepIndex, achievementId));
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AchievementStep(stepIndex, achievementId));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AchievementStep_CustomDataTest()
|
||||
{
|
||||
var stepIndex = 0;
|
||||
var achievementId = "unit_tester";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AchievementStep(stepIndex, achievementId, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a592d27ead6884163839d4f8da3977ef
|
||||
timeCreated: 1489734081
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void AchievementUnlocked_AchievementIdTest(
|
||||
[Values("unit_tester", "", null)] string achievementId
|
||||
)
|
||||
{
|
||||
if (string.IsNullOrEmpty(achievementId))
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => AnalyticsEvent.AchievementUnlocked(achievementId));
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AchievementUnlocked(achievementId));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AchievementUnlocked_CustomDataTest()
|
||||
{
|
||||
var achievementId = "unit_tester";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AchievementUnlocked(achievementId, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d1114812d620342e1a4ad3eaae7e220c
|
||||
timeCreated: 1489734081
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,62 @@
|
|||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void AdComplete_RewardedTest(
|
||||
[Values(true, false)] bool rewarded
|
||||
)
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdComplete(rewarded));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AdComplete_NetworkStringTest(
|
||||
[Values("unityads", "", null)] string network
|
||||
)
|
||||
{
|
||||
var rewarded = true;
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdComplete(rewarded, network));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AdComplete_NetworkEnumTest(
|
||||
[Values(AdvertisingNetwork.UnityAds, AdvertisingNetwork.None)] AdvertisingNetwork network
|
||||
)
|
||||
{
|
||||
var rewarded = true;
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdComplete(rewarded, network));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AdComplete_PlacementIdTest(
|
||||
[Values("rewardedVideo", "", null)] string placementId
|
||||
)
|
||||
{
|
||||
var rewarded = true;
|
||||
var network = AdvertisingNetwork.UnityAds;
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdComplete(rewarded, network, placementId));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AdComplete_CustomDataTest()
|
||||
{
|
||||
var rewarded = true;
|
||||
var network = AdvertisingNetwork.UnityAds;
|
||||
var placementId = "rewardedVideo";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdComplete(rewarded, network, placementId, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9405b416c158444b19157040fd664533
|
||||
timeCreated: 1489734081
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,62 @@
|
|||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void AdOffer_RewardedTest(
|
||||
[Values(true, false)] bool rewarded
|
||||
)
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdOffer(rewarded));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AdOffer_NetworkStringTest(
|
||||
[Values("unityads", "", null)] string network
|
||||
)
|
||||
{
|
||||
var rewarded = true;
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdOffer(rewarded, network));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AdOffer_NetworkEnumTest(
|
||||
[Values(AdvertisingNetwork.UnityAds, AdvertisingNetwork.None)] AdvertisingNetwork network
|
||||
)
|
||||
{
|
||||
var rewarded = true;
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdOffer(rewarded, network));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AdOffer_PlacementIdTest(
|
||||
[Values("rewardedVideo", "", null)] string placementId
|
||||
)
|
||||
{
|
||||
var rewarded = true;
|
||||
var network = AdvertisingNetwork.UnityAds;
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdOffer(rewarded, network, placementId));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AdOffer_CustomDataTest()
|
||||
{
|
||||
var rewarded = true;
|
||||
var network = AdvertisingNetwork.UnityAds;
|
||||
var placementId = "rewardedVideo";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdOffer(rewarded, network, placementId, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 96626a3e271e94e76a848c68828fbbac
|
||||
timeCreated: 1489734081
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,62 @@
|
|||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void AdSkip_RewardedTest(
|
||||
[Values(true, false)] bool rewarded
|
||||
)
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdSkip(rewarded));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AdSkip_NetworkStringTest(
|
||||
[Values("unityads", "", null)] string network
|
||||
)
|
||||
{
|
||||
var rewarded = true;
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdSkip(rewarded, network));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AdSkip_NetworkEnumTest(
|
||||
[Values(AdvertisingNetwork.UnityAds, AdvertisingNetwork.None)] AdvertisingNetwork network
|
||||
)
|
||||
{
|
||||
var rewarded = true;
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdSkip(rewarded, network));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AdSkip_PlacementIdTest(
|
||||
[Values("rewardedVideo", "", null)] string placementId
|
||||
)
|
||||
{
|
||||
var rewarded = true;
|
||||
var network = AdvertisingNetwork.UnityAds;
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdSkip(rewarded, network, placementId));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AdSkip_CustomDataTest()
|
||||
{
|
||||
var rewarded = true;
|
||||
var network = AdvertisingNetwork.UnityAds;
|
||||
var placementId = "rewardedVideo";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdSkip(rewarded, network, placementId, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c09652e660b34484cb10d35ed2206df5
|
||||
timeCreated: 1489734081
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,62 @@
|
|||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void AdStart_RewardedTest(
|
||||
[Values(true, false)] bool rewarded
|
||||
)
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdStart(rewarded));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AdStart_NetworkStringTest(
|
||||
[Values("unityads", "", null)] string network
|
||||
)
|
||||
{
|
||||
var rewarded = true;
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdStart(rewarded, network));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AdStart_NetworkEnumTest(
|
||||
[Values(AdvertisingNetwork.UnityAds, AdvertisingNetwork.None)] AdvertisingNetwork network
|
||||
)
|
||||
{
|
||||
var rewarded = true;
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdStart(rewarded, network));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AdStart_PlacementIdTest(
|
||||
[Values("rewardedVideo", "", null)] string placementId
|
||||
)
|
||||
{
|
||||
var rewarded = true;
|
||||
var network = AdvertisingNetwork.UnityAds;
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdStart(rewarded, network, placementId));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AdStart_CustomDataTest()
|
||||
{
|
||||
var rewarded = true;
|
||||
var network = AdvertisingNetwork.UnityAds;
|
||||
var placementId = "rewardedVideo";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdStart(rewarded, network, placementId, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 589b3ddef1e4d44cea68e0144bd95434
|
||||
timeCreated: 1489734081
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,115 @@
|
|||
#pragma warning disable 0612, 0618
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
[TestFixture, Category("Standard Event SDK")]
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
readonly Dictionary<string, object> m_CustomData = new Dictionary<string, object>();
|
||||
AnalyticsResult m_Result = AnalyticsResult.Ok;
|
||||
|
||||
[SetUp]
|
||||
public void TestCaseSetUp()
|
||||
{
|
||||
m_Result = AnalyticsResult.Ok;
|
||||
|
||||
m_CustomData.Clear();
|
||||
m_CustomData.Add("custom_param", "test");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SdkVersion_FormatTest()
|
||||
{
|
||||
int major, minor, patch;
|
||||
var versions = AnalyticsEvent.sdkVersion.Split('.');
|
||||
|
||||
Assert.AreEqual(3, versions.Length, "Number of integer fields in version format");
|
||||
|
||||
Assert.IsTrue(int.TryParse(versions[0], out major), "Major version is an integer");
|
||||
Assert.IsTrue(int.TryParse(versions[1], out minor), "Minor version is an integer");
|
||||
Assert.IsTrue(int.TryParse(versions[2], out patch), "Patch version is an integer");
|
||||
|
||||
Assert.LessOrEqual(0, major, "Major version");
|
||||
Assert.LessOrEqual(0, minor, "Minor version");
|
||||
Assert.LessOrEqual(0, patch, "Patch version");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Custom_EventNameTest(
|
||||
[Values("custom_event", "", null)] string eventName
|
||||
)
|
||||
{
|
||||
if (string.IsNullOrEmpty(eventName))
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => m_Result = AnalyticsEvent.Custom(eventName));
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.Custom(eventName));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Custom_EventDataTest()
|
||||
{
|
||||
var eventName = "custom_event";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.Custom(eventName, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Custom_RegisterUnregisterUnnamedTest()
|
||||
{
|
||||
Action<IDictionary<string, object>> myAction =
|
||||
eventData => eventData.Add("my_key", "my_value");
|
||||
|
||||
AnalyticsEvent.Register(myAction); // Registering for a named AnalyticsEvent
|
||||
|
||||
var eventName = "custom_event";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.Custom(eventName, m_CustomData));
|
||||
|
||||
EvaluateRegisteredCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
|
||||
AnalyticsEvent.Unregister(myAction);
|
||||
}
|
||||
|
||||
/// Normal. Unregistered.
|
||||
public static void EvaluateCustomData(IDictionary<string, object> customData)
|
||||
{
|
||||
Assert.AreEqual(1, customData.Count, "Custom param count");
|
||||
}
|
||||
|
||||
/// For Registered case.
|
||||
public static void EvaluateRegisteredCustomData(IDictionary<string, object> customData)
|
||||
{
|
||||
Assert.AreEqual(2, customData.Count, "Custom param count");
|
||||
}
|
||||
|
||||
public static void EvaluateAnalyticsResult(AnalyticsResult result)
|
||||
{
|
||||
switch (result)
|
||||
{
|
||||
case AnalyticsResult.Ok:
|
||||
break;
|
||||
case AnalyticsResult.InvalidData:
|
||||
Assert.Fail("Event data is invalid.");
|
||||
break;
|
||||
case AnalyticsResult.TooManyItems:
|
||||
Assert.Fail("Event data consists of too many parameters.");
|
||||
break;
|
||||
default:
|
||||
Debug.LogFormat("A result of {0} is passable for the purpose of this test.", result);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b5366b8adc0f44b3c9cb261a3f752d7a
|
||||
timeCreated: 1492730660
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,22 @@
|
|||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void ChatMessageSent_NoArgsTest()
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ChatMessageSent());
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ChatMessageSent_CustomDataTest()
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ChatMessageSent(m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7b186a0d29a784d81809e8a5471d155e
|
||||
timeCreated: 1489734081
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void CutsceneSkip_CutsceneNameTest(
|
||||
[Values("test_cutscene", "", null)] string name
|
||||
)
|
||||
{
|
||||
if (string.IsNullOrEmpty(name))
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => AnalyticsEvent.CutsceneSkip(name));
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.CutsceneSkip(name));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CutsceneSkip_CustomDataTest()
|
||||
{
|
||||
var name = "test_cutscene";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.CutsceneSkip(name, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f03b3e03b69e74ef9bd0f20377217a73
|
||||
timeCreated: 1489734081
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void CutsceneStart_CutsceneNameTest(
|
||||
[Values("test_cutscene", "", null)] string name
|
||||
)
|
||||
{
|
||||
if (string.IsNullOrEmpty(name))
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => AnalyticsEvent.CutsceneStart(name));
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.CutsceneStart(name));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CutsceneStart_CustomDataTest()
|
||||
{
|
||||
var name = "test_cutscene";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.CutsceneStart(name, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: edf97aac6cc5a437ebf600a06a2e5ac7
|
||||
timeCreated: 1492896816
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,33 @@
|
|||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void FirstInteraction_NoArgsTest()
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.FirstInteraction());
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void FirstInteraction_ActionIdTest(
|
||||
[Values("test_user_action", "", null)] string actionId
|
||||
)
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.FirstInteraction(actionId));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void FirstInteraction_CustomDataTest()
|
||||
{
|
||||
var actionId = "test_user_action";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.FirstInteraction(actionId, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 78759e25237a7430587982cd92a2a0d8
|
||||
timeCreated: 1489734081
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,58 @@
|
|||
using System;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void GameOver_NoArgsTest()
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.GameOver());
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GameOver_LevelIndexTest(
|
||||
[Values(-1, 0, 1)] int levelIndex
|
||||
)
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.GameOver(levelIndex));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GameOver_LevelNameTest(
|
||||
[Values("test_level", "", null)] string levelName
|
||||
)
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.GameOver(levelName));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GameOver_LevelIndex_LevelNameTest(
|
||||
[Values(0)] int levelIndex,
|
||||
[Values("test_level", "", null)] string levelName
|
||||
)
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.GameOver(levelIndex, levelName));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GameOver_CustomDataTest()
|
||||
{
|
||||
var levelIndex = 0;
|
||||
var levelName = "test_level";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.GameOver(levelName, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.GameOver(levelIndex, levelName, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a30e59ca9f68d46db88323ac18f49e31
|
||||
timeCreated: 1489734081
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,22 @@
|
|||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void GameStart_NoArgsTest()
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.GameStart());
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GameStart_CustomDataTest()
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.GameStart(m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2b2be9ee9f41a4b2db6b502697ba31b1
|
||||
timeCreated: 1489734081
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,111 @@
|
|||
using System;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void IAPTransaction_ContextTest(
|
||||
[Values("test", "", null)] string context)
|
||||
{
|
||||
var price = 1f;
|
||||
var itemId = "test_item";
|
||||
|
||||
if (string.IsNullOrEmpty(context))
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => AnalyticsEvent.IAPTransaction(context, price, itemId));
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.IAPTransaction(context, price, itemId));
|
||||
}
|
||||
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void IAPTransaction_PriceTest(
|
||||
[Values(-1f, 0f, 1f)] float price)
|
||||
{
|
||||
var context = "test";
|
||||
var itemId = "test_item";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.IAPTransaction(context, price, itemId));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void IAPTransaction_ItemIdTest(
|
||||
[Values("test_item", "", null)] string itemId)
|
||||
{
|
||||
var context = "test";
|
||||
var price = 1f;
|
||||
|
||||
if (string.IsNullOrEmpty(itemId))
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => AnalyticsEvent.IAPTransaction(context, price, itemId));
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.IAPTransaction(context, price, itemId));
|
||||
}
|
||||
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void IAPTransaction_ItemTypeTest(
|
||||
[Values("test_type", "", null)] string itemType)
|
||||
{
|
||||
var context = "test";
|
||||
var price = 1f;
|
||||
var itemId = "test_item";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.IAPTransaction(context, price, itemId, itemType));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void IAPTransaction_LevelTest(
|
||||
[Values("test_level", "", null)] string level)
|
||||
{
|
||||
var context = "test";
|
||||
var price = 1f;
|
||||
var itemId = "test_item";
|
||||
var itemType = "test_type";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.IAPTransaction(context, price, itemId, itemType, level));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void IAPTransaction_TransactionIdTest(
|
||||
[Values("test_id", "", null)] string transactionId)
|
||||
{
|
||||
var context = "test";
|
||||
var price = 1f;
|
||||
var itemId = "test_item";
|
||||
var itemType = "test_type";
|
||||
var level = "test_level";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.IAPTransaction(context, price, itemId, itemType, level, transactionId));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void IAPTransaction_CustomDataTest()
|
||||
{
|
||||
var context = "test";
|
||||
var price = 1f;
|
||||
var itemId = "test_item";
|
||||
var itemType = "test_type";
|
||||
var level = "test_level";
|
||||
var transactionId = "test_id";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.IAPTransaction(context, price, itemId, itemType, level, transactionId, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8b4a8234f532f4b34aba0ab70400d90d
|
||||
timeCreated: 1497539738
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,176 @@
|
|||
using System;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void ItemAcquired_CurrencyTypeTest(
|
||||
[Values(AcquisitionType.Premium, AcquisitionType.Soft)] AcquisitionType currencyType)
|
||||
{
|
||||
var context = "test";
|
||||
var amount = 1f;
|
||||
var itemId = "test_item";
|
||||
var balance = 1f;
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ItemAcquired_ContextTest(
|
||||
[Values("test", "", null)] string context)
|
||||
{
|
||||
var currencyType = AcquisitionType.Soft;
|
||||
var amount = 1f;
|
||||
var itemId = "test_item";
|
||||
var balance = 1f;
|
||||
|
||||
if (string.IsNullOrEmpty(context))
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId));
|
||||
Assert.Throws<ArgumentException>(() => AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance));
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ItemAcquired_AmountTest(
|
||||
[Values(-1f, 0f, 1f)] float amount)
|
||||
{
|
||||
var currencyType = AcquisitionType.Soft;
|
||||
var context = "test";
|
||||
var itemId = "test_item";
|
||||
var balance = 1f;
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ItemAcquired_ItemIdTest(
|
||||
[Values("test_item", "", null)] string itemId)
|
||||
{
|
||||
var currencyType = AcquisitionType.Soft;
|
||||
var context = "test";
|
||||
var amount = 1f;
|
||||
var balance = 1f;
|
||||
|
||||
if (string.IsNullOrEmpty(itemId))
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId));
|
||||
Assert.Throws<ArgumentException>(() => AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance));
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ItemAcquired_BalanceTest(
|
||||
[Values(-1f, 0, 1f)] float balance)
|
||||
{
|
||||
var currencyType = AcquisitionType.Soft;
|
||||
var context = "test";
|
||||
var amount = 1f;
|
||||
var itemId = "test_item";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ItemAcquired_ItemTypeTest(
|
||||
[Values("test_type", "", null)] string itemType)
|
||||
{
|
||||
var currencyType = AcquisitionType.Soft;
|
||||
var context = "test";
|
||||
var amount = 1f;
|
||||
var itemId = "test_item";
|
||||
var balance = 1f;
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, itemType));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance, itemType));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ItemAcquired_LevelTest(
|
||||
[Values("test_level", "", null)] string level)
|
||||
{
|
||||
var currencyType = AcquisitionType.Soft;
|
||||
var context = "test";
|
||||
var amount = 1f;
|
||||
var itemId = "test_item";
|
||||
var balance = 1f;
|
||||
var itemType = "test_type";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, itemType, level));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance, itemType, level));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ItemAcquired_TransactionIdTest(
|
||||
[Values("test_id", "", null)] string transactionId)
|
||||
{
|
||||
var currencyType = AcquisitionType.Soft;
|
||||
var context = "test";
|
||||
var amount = 1f;
|
||||
var itemId = "test_item";
|
||||
var balance = 1f;
|
||||
var itemType = "test_type";
|
||||
var level = "test_level";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, itemType, level, transactionId));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance, itemType, level, transactionId));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ItemAcquired_CustomDataTest()
|
||||
{
|
||||
var currencyType = AcquisitionType.Soft;
|
||||
var context = "test";
|
||||
var amount = 1f;
|
||||
var itemId = "test_item";
|
||||
var balance = 1f;
|
||||
var itemType = "test_type";
|
||||
var level = "test_level";
|
||||
var transactionId = "test_id";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, itemType, level, transactionId, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance, itemType, level, transactionId, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5e7a49a6952af4d4ab2c3b038be68141
|
||||
timeCreated: 1497539770
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,176 @@
|
|||
using System;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void ItemSpent_CurrencyTypeTest(
|
||||
[Values(AcquisitionType.Premium, AcquisitionType.Soft)] AcquisitionType currencyType)
|
||||
{
|
||||
var context = "test";
|
||||
var amount = 1f;
|
||||
var itemId = "test_item";
|
||||
var balance = 1f;
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ItemSpent_ContextTest(
|
||||
[Values("test", "", null)] string context)
|
||||
{
|
||||
var currencyType = AcquisitionType.Soft;
|
||||
var amount = 1f;
|
||||
var itemId = "test_item";
|
||||
var balance = 1f;
|
||||
|
||||
if (string.IsNullOrEmpty(context))
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId));
|
||||
Assert.Throws<ArgumentException>(() => AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance));
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ItemSpent_AmountTest(
|
||||
[Values(-1f, 0f, 1f)] float amount)
|
||||
{
|
||||
var currencyType = AcquisitionType.Soft;
|
||||
var context = "test";
|
||||
var itemId = "test_item";
|
||||
var balance = 1f;
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ItemSpent_ItemIdTest(
|
||||
[Values("test_item", "", null)] string itemId)
|
||||
{
|
||||
var currencyType = AcquisitionType.Soft;
|
||||
var context = "test";
|
||||
var amount = 1f;
|
||||
var balance = 1f;
|
||||
|
||||
if (string.IsNullOrEmpty(itemId))
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId));
|
||||
Assert.Throws<ArgumentException>(() => AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance));
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ItemSpent_BalanceTest(
|
||||
[Values(-1f, 0, 1f)] float balance)
|
||||
{
|
||||
var currencyType = AcquisitionType.Soft;
|
||||
var context = "test";
|
||||
var amount = 1f;
|
||||
var itemId = "test_item";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ItemSpent_ItemTypeTest(
|
||||
[Values("test_type", "", null)] string itemType)
|
||||
{
|
||||
var currencyType = AcquisitionType.Soft;
|
||||
var context = "test";
|
||||
var amount = 1f;
|
||||
var itemId = "test_item";
|
||||
var balance = 1f;
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, itemType));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance, itemType));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ItemSpent_LevelTest(
|
||||
[Values("test_level", "", null)] string level)
|
||||
{
|
||||
var currencyType = AcquisitionType.Soft;
|
||||
var context = "test";
|
||||
var amount = 1f;
|
||||
var itemId = "test_item";
|
||||
var balance = 1f;
|
||||
var itemType = "test_type";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, itemType, level));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance, itemType, level));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ItemSpent_TransactionIdTest(
|
||||
[Values("test_id", "", null)] string transactionId)
|
||||
{
|
||||
var currencyType = AcquisitionType.Soft;
|
||||
var context = "test";
|
||||
var amount = 1f;
|
||||
var itemId = "test_item";
|
||||
var balance = 1f;
|
||||
var itemType = "test_type";
|
||||
var level = "test_level";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, itemType, level, transactionId));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance, itemType, level, transactionId));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ItemSpent_CustomDataTest()
|
||||
{
|
||||
var currencyType = AcquisitionType.Soft;
|
||||
var context = "test";
|
||||
var amount = 1f;
|
||||
var itemId = "test_item";
|
||||
var balance = 1f;
|
||||
var itemType = "test_type";
|
||||
var level = "test_level";
|
||||
var transactionId = "test_id";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, itemType, level, transactionId, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance, itemType, level, transactionId, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 00ed25e3298ac440eb327c706a964e3a
|
||||
timeCreated: 1497539780
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,58 @@
|
|||
using System;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void LevelComplete_LevelIndexTest(
|
||||
[Values(-1, 0, 1)] int levelIndex
|
||||
)
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelComplete(levelIndex));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void LevelComplete_LevelNameTest(
|
||||
[Values("test_level", "", null)] string levelName
|
||||
)
|
||||
{
|
||||
if (string.IsNullOrEmpty(levelName))
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => AnalyticsEvent.LevelComplete(levelName));
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelComplete(levelName));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
|
||||
// [Test]
|
||||
// public void LevelComplete_LevelIndex_LevelNameTest (
|
||||
// [Values(0)] int levelIndex,
|
||||
// [Values("test_level", "", null)] string levelName
|
||||
// )
|
||||
// {
|
||||
// Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelComplete(levelIndex, levelName));
|
||||
// EvaluateAnalyticsResult(m_Result);
|
||||
// }
|
||||
|
||||
[Test]
|
||||
public void LevelComplete_CustomDataTest()
|
||||
{
|
||||
var levelIndex = 0;
|
||||
var levelName = "test_level";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelComplete(levelName, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelComplete(levelIndex, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: fa4ff09b6aaaa4df29a884efa38bce56
|
||||
timeCreated: 1489734081
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,58 @@
|
|||
using System;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void LevelFail_LevelIndexTest(
|
||||
[Values(-1, 0, 1)] int levelIndex
|
||||
)
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelFail(levelIndex));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void LevelFail_LevelNameTest(
|
||||
[Values("test_level", "", null)] string levelName
|
||||
)
|
||||
{
|
||||
if (string.IsNullOrEmpty(levelName))
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => AnalyticsEvent.LevelFail(levelName));
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelFail(levelName));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
|
||||
// [Test]
|
||||
// public void LevelFail_LevelIndex_LevelNameTest (
|
||||
// [Values(-1, 0, 1)] int levelIndex,
|
||||
// [Values("test_level", "", null)] string levelName
|
||||
// )
|
||||
// {
|
||||
// Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelFail(levelIndex, levelName));
|
||||
// EvaluateAnalyticsResult(m_Result);
|
||||
// }
|
||||
|
||||
[Test]
|
||||
public void LevelFail_CustomDataTest()
|
||||
{
|
||||
var levelIndex = 0;
|
||||
var levelName = "test_level";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelFail(levelName, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelFail(levelIndex, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 036d03e26977243fa9a2d7af48e51e08
|
||||
timeCreated: 1489734081
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,58 @@
|
|||
using System;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void LevelQuit_LevelIndexTest(
|
||||
[Values(-1, 0, 1)] int levelIndex
|
||||
)
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelQuit(levelIndex));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void LevelQuit_LevelNameTest(
|
||||
[Values("test_level", "", null)] string levelName
|
||||
)
|
||||
{
|
||||
if (string.IsNullOrEmpty(levelName))
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => AnalyticsEvent.LevelQuit(levelName));
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelQuit(levelName));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
|
||||
// [Test]
|
||||
// public void LevelQuit_LevelIndex_LevelNameTest (
|
||||
// [Values(-1, 0, 1)] int levelIndex,
|
||||
// [Values("test_level", "", null)] string levelName
|
||||
// )
|
||||
// {
|
||||
// Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelQuit(levelIndex, levelName));
|
||||
// EvaluateAnalyticsResult(m_Result);
|
||||
// }
|
||||
|
||||
[Test]
|
||||
public void LevelQuit_CustomDataTest()
|
||||
{
|
||||
var levelIndex = 0;
|
||||
var levelName = "test_level";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelQuit(levelName, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelQuit(levelIndex, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 617202f4e2bed4ef8acccfd6c1ecd6fa
|
||||
timeCreated: 1489734081
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,58 @@
|
|||
using System;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void LevelSkip_LevelIndexTest(
|
||||
[Values(-1, 0, 1)] int levelIndex
|
||||
)
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelSkip(levelIndex));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void LevelSkip_LevelNameTest(
|
||||
[Values("test_level", "", null)] string levelName
|
||||
)
|
||||
{
|
||||
if (string.IsNullOrEmpty(levelName))
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => AnalyticsEvent.LevelSkip(levelName));
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelSkip(levelName));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
|
||||
// [Test]
|
||||
// public void LevelSkip_LevelIndex_LevelNameTest (
|
||||
// [Values(-1, 0, 1)] int levelIndex,
|
||||
// [Values("test_level", "", null)] string levelName
|
||||
// )
|
||||
// {
|
||||
// Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelSkip(levelIndex, levelName));
|
||||
// EvaluateAnalyticsResult(m_Result);
|
||||
// }
|
||||
|
||||
[Test]
|
||||
public void LevelSkip_CustomDataTest()
|
||||
{
|
||||
var levelIndex = 0;
|
||||
var levelName = "test_level";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelSkip(levelName, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelSkip(levelIndex, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 93f7ca1a9c5c945a89e884f9611c70f0
|
||||
timeCreated: 1489734081
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,58 @@
|
|||
using System;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void LevelStart_LevelIndexTest(
|
||||
[Values(-1, 0, 1)] int levelIndex
|
||||
)
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelStart(levelIndex));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void LevelStart_LevelNameTest(
|
||||
[Values("test_level", "", null)] string levelName
|
||||
)
|
||||
{
|
||||
if (string.IsNullOrEmpty(levelName))
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => AnalyticsEvent.LevelStart(levelName));
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelStart(levelName));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
|
||||
// [Test]
|
||||
// public void LevelStart_LevelIndex_LevelNameTest (
|
||||
// [Values(0)] int levelIndex,
|
||||
// [Values("test_level", "", null)] string levelName
|
||||
// )
|
||||
// {
|
||||
// Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelStart(levelIndex, levelName));
|
||||
// EvaluateAnalyticsResult(m_Result);
|
||||
// }
|
||||
|
||||
[Test]
|
||||
public void LevelStart_CustomDataTest()
|
||||
{
|
||||
var levelIndex = 0;
|
||||
var levelName = "test_level";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelStart(levelName, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelStart(levelIndex, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 876d47a520ae34f81a97792e1afed14b
|
||||
timeCreated: 1489734081
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,58 @@
|
|||
using System;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void LevelUp_LevelIndexTest(
|
||||
[Values(0, 1, 2)] int newLevelIndex
|
||||
)
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelUp(newLevelIndex));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void LevelUp_LevelNameTest(
|
||||
[Values("new_test_level", "", null)] string newLevelName
|
||||
)
|
||||
{
|
||||
if (string.IsNullOrEmpty(newLevelName))
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => AnalyticsEvent.LevelUp(newLevelName));
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelUp(newLevelName));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
|
||||
// [Test]
|
||||
// public void LevelUp_LevelIndex_LevelNameTest (
|
||||
// [Values(1)] int newLevelIndex,
|
||||
// [Values("new_test_level", "", null)] string newLevelName
|
||||
// )
|
||||
// {
|
||||
// Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelUp(newLevelIndex, newLevelName));
|
||||
// EvaluateAnalyticsResult(m_Result);
|
||||
// }
|
||||
|
||||
[Test]
|
||||
public void LevelUp_CustomDataTest()
|
||||
{
|
||||
var newLevelIndex = 1;
|
||||
var newLevelName = "new_test_level";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelUp(newLevelName, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelUp(newLevelIndex, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b0bb2afc5cd494e6f9b44455a0fc22f8
|
||||
timeCreated: 1489734081
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,62 @@
|
|||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void PostAdAction_RewardedTest(
|
||||
[Values(true, false)] bool rewarded
|
||||
)
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.PostAdAction(rewarded));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void PostAdAction_NetworkStringTest(
|
||||
[Values("unityads", "", null)] string network
|
||||
)
|
||||
{
|
||||
var rewarded = true;
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.PostAdAction(rewarded, network));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void PostAdAction_NetworkEnumTest(
|
||||
[Values(AdvertisingNetwork.UnityAds, AdvertisingNetwork.None)] AdvertisingNetwork network
|
||||
)
|
||||
{
|
||||
var rewarded = true;
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.PostAdAction(rewarded, network));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void PostAdAction_PlacementIdTest(
|
||||
[Values("rewardedVideo", "", null)] string placementId
|
||||
)
|
||||
{
|
||||
var rewarded = true;
|
||||
var network = AdvertisingNetwork.UnityAds;
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.PostAdAction(rewarded, network, placementId));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void PostAdAction_CustomDataTest()
|
||||
{
|
||||
var rewarded = true;
|
||||
var network = AdvertisingNetwork.UnityAds;
|
||||
var placementId = "rewardedVideo";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.PostAdAction(rewarded, network, placementId, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 293182c4d29604c05b6724ae00fd121a
|
||||
timeCreated: 1489734081
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void PushNotificationClick_MessageIdTest(
|
||||
[Values("test_message", "", null)] string messageId
|
||||
)
|
||||
{
|
||||
if (string.IsNullOrEmpty(messageId))
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => AnalyticsEvent.PushNotificationClick(messageId));
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.PushNotificationClick(messageId));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void PushNotificationClick_CustomDataTest()
|
||||
{
|
||||
var messageId = "test_message";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.PushNotificationClick(messageId, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 240551e3142f04b0ca801ce8eb645ba2
|
||||
timeCreated: 1489734081
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,22 @@
|
|||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void PushNotificationEnable_NoArgsTest()
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.PushNotificationEnable());
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void PushNotificationEnable_CustomDataTest()
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.PushNotificationEnable(m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a10564aae782c458cbf1de024f4870f7
|
||||
timeCreated: 1489734081
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,43 @@
|
|||
using System;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void ScreenVisit_ScreenNameStringTest(
|
||||
[Values("test_screen", "", null)] string screenName
|
||||
)
|
||||
{
|
||||
if (string.IsNullOrEmpty(screenName))
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => AnalyticsEvent.ScreenVisit(screenName));
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ScreenVisit(screenName));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ScreenVisit_ScreenNameEnumTest(
|
||||
[Values(ScreenName.CrossPromo, ScreenName.IAPPromo, ScreenName.None)] ScreenName screenName
|
||||
)
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ScreenVisit(screenName));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ScreenVisit_CustomDataTest()
|
||||
{
|
||||
var screenName = ScreenName.MainMenu;
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ScreenVisit(screenName, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 768d77435df35443bad74aedc993c0cf
|
||||
timeCreated: 1489734081
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,110 @@
|
|||
using System;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void SocialShareAccept_ShareTypeStringTest(
|
||||
[Values("test_share", "", null)] string shareType
|
||||
)
|
||||
{
|
||||
var socialNetwork = SocialNetwork.Facebook;
|
||||
|
||||
if (string.IsNullOrEmpty(shareType))
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => AnalyticsEvent.SocialShare(shareType, socialNetwork));
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.SocialShareAccept(shareType, socialNetwork));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SocialShareAccept_ShareTypeEnumTest(
|
||||
[Values(ShareType.TextOnly, ShareType.Image, ShareType.None)] ShareType shareType
|
||||
)
|
||||
{
|
||||
var socialNetwork = SocialNetwork.Twitter;
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.SocialShareAccept(shareType, socialNetwork));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SocialShareAccept_SocialNetworkStringTest(
|
||||
[Values("test_network", "", null)] string socialNetwork
|
||||
)
|
||||
{
|
||||
var shareType = ShareType.Image;
|
||||
|
||||
if (string.IsNullOrEmpty(socialNetwork))
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => AnalyticsEvent.SocialShare(shareType, socialNetwork));
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.SocialShareAccept(shareType, socialNetwork));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SocialShareAccept_SocialNetworkEnumTest(
|
||||
[Values(SocialNetwork.GooglePlus, SocialNetwork.OK_ru, SocialNetwork.None)] SocialNetwork socialNetwork
|
||||
)
|
||||
{
|
||||
var shareType = ShareType.Video;
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.SocialShareAccept(shareType, socialNetwork));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SocialShareAccept_SenderIdTest(
|
||||
[Values("test_sender", "", null)] string senderId
|
||||
)
|
||||
{
|
||||
var shareType = ShareType.TextOnly;
|
||||
var socialNetwork = SocialNetwork.Twitter;
|
||||
|
||||
Assert.DoesNotThrow(
|
||||
() => m_Result = AnalyticsEvent.SocialShareAccept(shareType, socialNetwork, senderId)
|
||||
);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SocialShareAccept_RecipientIdTest(
|
||||
[Values("test_recipient", "", null)] string recipientId
|
||||
)
|
||||
{
|
||||
var shareType = ShareType.TextOnly;
|
||||
var socialNetwork = SocialNetwork.Twitter;
|
||||
var senderId = "test_sender";
|
||||
|
||||
Assert.DoesNotThrow(
|
||||
() => m_Result = AnalyticsEvent.SocialShareAccept(shareType, socialNetwork, senderId, recipientId)
|
||||
);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SocialShareAccept_CustomDataTest()
|
||||
{
|
||||
var shareType = ShareType.TextOnly;
|
||||
var socialNetwork = SocialNetwork.Twitter;
|
||||
var senderId = "test_sender";
|
||||
var recipientId = "test_recipient";
|
||||
|
||||
Assert.DoesNotThrow(
|
||||
() => m_Result = AnalyticsEvent.SocialShareAccept(shareType, socialNetwork, senderId, recipientId, m_CustomData)
|
||||
);
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 138961c4434d141a987d96df1f8d7342
|
||||
timeCreated: 1492896446
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,110 @@
|
|||
using System;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void SocialShare_ShareTypeStringTest(
|
||||
[Values("test_share", "", null)] string shareType
|
||||
)
|
||||
{
|
||||
var socialNetwork = SocialNetwork.Facebook;
|
||||
|
||||
if (string.IsNullOrEmpty(shareType))
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => AnalyticsEvent.SocialShare(shareType, socialNetwork));
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.SocialShare(shareType, socialNetwork));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SocialShare_ShareTypeEnumTest(
|
||||
[Values(ShareType.TextOnly, ShareType.Image, ShareType.None)] ShareType shareType
|
||||
)
|
||||
{
|
||||
var socialNetwork = SocialNetwork.Twitter;
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.SocialShare(shareType, socialNetwork));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SocialShare_SocialNetworkStringTest(
|
||||
[Values("test_network", "", null)] string socialNetwork
|
||||
)
|
||||
{
|
||||
var shareType = ShareType.Image;
|
||||
|
||||
if (string.IsNullOrEmpty(socialNetwork))
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => AnalyticsEvent.SocialShare(shareType, socialNetwork));
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.SocialShare(shareType, socialNetwork));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SocialShare_SocialNetworkEnumTest(
|
||||
[Values(SocialNetwork.GooglePlus, SocialNetwork.OK_ru, SocialNetwork.None)] SocialNetwork socialNetwork
|
||||
)
|
||||
{
|
||||
var shareType = ShareType.Video;
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.SocialShare(shareType, socialNetwork));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SocialShare_SenderIdTest(
|
||||
[Values("test_sender", "", null)] string senderId
|
||||
)
|
||||
{
|
||||
var shareType = ShareType.TextOnly;
|
||||
var socialNetwork = SocialNetwork.Twitter;
|
||||
|
||||
Assert.DoesNotThrow(
|
||||
() => m_Result = AnalyticsEvent.SocialShare(shareType, socialNetwork, senderId)
|
||||
);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SocialShare_RecipientIdTest(
|
||||
[Values("test_recipient", "", null)] string recipientId
|
||||
)
|
||||
{
|
||||
var shareType = ShareType.TextOnly;
|
||||
var socialNetwork = SocialNetwork.Twitter;
|
||||
var senderId = "test_sender";
|
||||
|
||||
Assert.DoesNotThrow(
|
||||
() => m_Result = AnalyticsEvent.SocialShare(shareType, socialNetwork, senderId, recipientId)
|
||||
);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SocialShare_CustomDataTest()
|
||||
{
|
||||
var shareType = ShareType.TextOnly;
|
||||
var socialNetwork = SocialNetwork.Twitter;
|
||||
var senderId = "test_sender";
|
||||
var recipientId = "test_recipient";
|
||||
|
||||
Assert.DoesNotThrow(
|
||||
() => m_Result = AnalyticsEvent.SocialShare(shareType, socialNetwork, senderId, recipientId, m_CustomData)
|
||||
);
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 811f7f1f5920641c0a9233503492c9ba
|
||||
timeCreated: 1489734081
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,75 @@
|
|||
using System;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void StoreItemClick_StoreTypeTest(
|
||||
[Values(StoreType.Premium, StoreType.Soft)] StoreType storeType
|
||||
)
|
||||
{
|
||||
var itemId = "test_item";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.StoreItemClick(storeType, itemId));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void StoreItemClick_ItemIdTest(
|
||||
[Values("test_item", "", null)] string itemId
|
||||
)
|
||||
{
|
||||
var storeType = StoreType.Soft;
|
||||
|
||||
if (string.IsNullOrEmpty(itemId))
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => AnalyticsEvent.StoreItemClick(storeType, itemId));
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.StoreItemClick(storeType, itemId));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void StoreItemClick_ItemId_ItemNameTest(
|
||||
[Values("test_item_id", "", null)] string itemId,
|
||||
[Values("Test Item Name", "", null)] string itemName
|
||||
)
|
||||
{
|
||||
var storeType = StoreType.Soft;
|
||||
|
||||
if (string.IsNullOrEmpty(itemId) && string.IsNullOrEmpty(itemName))
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => AnalyticsEvent.StoreItemClick(storeType, itemId));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrEmpty(itemId))
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => AnalyticsEvent.StoreItemClick(storeType, itemId));
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.StoreItemClick(storeType, itemId, itemName));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void StoreItemClick_CustomDataTest()
|
||||
{
|
||||
var storeType = StoreType.Soft;
|
||||
var itemId = "test_item";
|
||||
var itemName = "Test Item";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.StoreItemClick(storeType, itemId, itemName, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c786248494be6489bbfa006bdf59c773
|
||||
timeCreated: 1489734081
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,27 @@
|
|||
using System.Collections.Generic;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void StoreOpened_StoreTypeTest(
|
||||
[Values(StoreType.Premium, StoreType.Soft)] StoreType storeType
|
||||
)
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.StoreOpened(storeType));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void StoreOpened_CustomDataTest()
|
||||
{
|
||||
var storeType = StoreType.Soft;
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.StoreOpened(storeType, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f4c7193663918411c8f78e3cf844cb9e
|
||||
timeCreated: 1489734081
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,26 @@
|
|||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void TutorialComplete_TutorialIdTest(
|
||||
[Values("test_tutorial", "", null)] string tutorialId
|
||||
)
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.TutorialComplete(tutorialId));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TutorialComplete_CustomDataTest()
|
||||
{
|
||||
var tutorialId = "test_tutorial";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.TutorialComplete(tutorialId, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b025f6f8a47be46418bcb0ed1050cfb4
|
||||
timeCreated: 1489734081
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,26 @@
|
|||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void TutorialSkip_TutorialIdTest(
|
||||
[Values("test_tutorial", "", null)] string tutorialId
|
||||
)
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.TutorialSkip(tutorialId));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TutorialSkip_CustomDataTest()
|
||||
{
|
||||
var tutorialId = "test_tutorial";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.TutorialSkip(tutorialId, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3ab6e6972ecb54e2cbd505692415a7ba
|
||||
timeCreated: 1489734081
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,26 @@
|
|||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void TutorialStart_TutorialIdTest(
|
||||
[Values("test_tutorial", "", null)] string tutorialId
|
||||
)
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.TutorialStart(tutorialId));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TutorialStart_CustomDataTest()
|
||||
{
|
||||
var tutorialId = "test_tutorial";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.TutorialStart(tutorialId, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2622838afa3284cc882c48ceea4c8220
|
||||
timeCreated: 1489734081
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void TutorialStep_StepIndexTest(
|
||||
[Values(-1, 0, 1)] int stepIndex
|
||||
)
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.TutorialStep(stepIndex));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TutorialStep_TutorialIdTest(
|
||||
[Values("test_tutorial", "", null)] string tutorialId
|
||||
)
|
||||
{
|
||||
var stepIndex = 0;
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.TutorialStep(stepIndex, tutorialId));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TutorialStep_CustomDataTest()
|
||||
{
|
||||
var stepIndex = 0;
|
||||
var tutorialId = "test_tutorial";
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.TutorialStep(stepIndex, tutorialId, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a571de1bea3cb4c9784493c6f1b0b76c
|
||||
timeCreated: 1489734081
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"name": "Unity.Analytics.StandardEvents.EditorTests",
|
||||
"references": [],
|
||||
"optionalUnityReferences": [
|
||||
"TestAssemblies"
|
||||
],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: adee0c1377ef8b2489060e152dd0d119
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,43 @@
|
|||
using System;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace UnityEngine.Analytics.Tests
|
||||
{
|
||||
public partial class AnalyticsEventTests
|
||||
{
|
||||
[Test]
|
||||
public void UserSignup_AuthorizationNetworkStringTest(
|
||||
[Values("test_network", "", null)] string network
|
||||
)
|
||||
{
|
||||
if (string.IsNullOrEmpty(network))
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => AnalyticsEvent.UserSignup(network));
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.UserSignup(network));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void UserSignup_AuthorizationNetworkEnumTest(
|
||||
[Values(AuthorizationNetwork.Facebook, AuthorizationNetwork.GameCenter, AuthorizationNetwork.None)] AuthorizationNetwork network
|
||||
)
|
||||
{
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.UserSignup(network));
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void UserSignup_CustomDataTest()
|
||||
{
|
||||
var network = AuthorizationNetwork.Internal;
|
||||
|
||||
Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.UserSignup(network, m_CustomData));
|
||||
EvaluateCustomData(m_CustomData);
|
||||
EvaluateAnalyticsResult(m_Result);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8b0f0c8689876421c90e7b60f096325a
|
||||
timeCreated: 1489734081
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4f5362359d4548b44a34a45f19efb4bf
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue