A'Ů2018.1.6f1ţ˙˙˙˙˙’3$řĚuń옲e+ Í=^7€˙˙˙˙€Ś€˛€ЀŚ€Ś€Ś€#Ś€+H€3˙˙˙˙€1€1€˙˙˙˙@ހ€ Q€j€ H€<˙˙˙˙ €1€1€˙˙˙˙ @ހ€ Q€j€Ő€I˙˙˙˙€1€1€˙˙˙˙Ŕހ€H€j€˙˙˙˙€1€1€˙˙˙˙@ހ€Q€j€™€PAssetMetaDataguiddata[0]data[1]data[2]data[3]pathNameoriginalNamelabelsassetStoreRef ˙˙ŢšőRkVc}­j˘9Ź­;Ę7€˙˙˙˙€Ś€˛€ Ő€ ހ#€.€,€†€Ä€ ހ#€.€,€H€Ť€˙˙˙˙€1€1€˙˙˙˙ @ހ€ Q€j€ ń€5˙˙˙˙ €1€1€˙˙˙˙ €ހ€€j€˙˙˙˙€G›€˙˙˙˙€H€]˙˙˙˙€1€1€˙˙˙˙@ހ€Q€j€H€b˙˙˙˙€1€1€˙˙˙˙@ހ€Q€j€H€k˙˙˙˙€1€1€˙˙˙˙@ހ€Q€j€y€ € ހ#€.€,€Ő€p˙˙˙˙ €1€1€˙˙˙˙!Ŕހ€"€j€˙˙˙˙#€H€›€˙˙˙˙$€1€1€˙˙˙˙%@ހ€&Q€j€'y€ € (ހ#)€.€,*€ €„+@ž€“ ,@ހ#-€.€,.€H€˜˙˙˙˙/€1€1€˙˙˙˙0@ހ€1Q€j€2H€Ł˙˙˙˙3€1€1€˙˙˙˙4@ހ€5Q€j€6H€ľ˙˙˙˙7€1€1€˙˙˙˙8@ހ€9Q€j€:MonoImporterPPtrm_FileIDm_PathIDm_ExternalObjectsSourceAssetIdentifiertypeassemblynamem_DefaultReferencesexecutionOrdericonm_UserDatam_AssetBundleNamem_AssetBundleVariants˙˙˙8-l'€Łć„hŒÎA,Œ€7€˙˙˙˙€Ś€˛€Ő€ ހ€.€€†€Ä€ ހ€.€€H€Ť€˙˙˙˙€1€1€˙˙˙˙ @ހ€ Q€j€ H€ę€˙˙˙˙ €1€1€˙˙˙˙ @ހ€Q€j€ń€(˙˙˙˙€1€1€˙˙˙˙€ހ€€j€˙˙˙˙€H€›€˙˙˙˙€1€1€˙˙˙˙@ހ€Q€j€y€ € ހ€.€€y€< ހ€.€€ހCH€T˙˙˙˙€1€1€˙˙˙˙ @ހ€!Q€j€"H€`˙˙˙˙#€1€1€˙˙˙˙$@ހ€%Q€j€&H€l˙˙˙˙'€1€1€˙˙˙˙(@ހ€)Q€j€*L€{+PPtrm_FileIDm_PathIDm_DefaultReferencesm_Iconm_ExecutionOrderm_ClassNamem_Namespacem_AssemblyNamem_IsEditorScriptˆˆDŕyŻĐ ÜbÄŚN(“Óœ ´bÎ ^Packages/com.unity.package-manager-ui/Tests/Editor/Services/Packages/PackageCollectionTests.csPackageCollectionTestsHusing System; using System.Collections.Generic; using System.Linq; using NUnit.Framework; using Semver; namespace UnityEditor.PackageManager.UI.Tests { internal class PackageCollectionTests : PackageBaseTests { private Action OnFilterChangeEvent; private Action> OnPackagesChangeEvent; [SetUp] public void Setup() { PackageCollection.Instance.SetFilter(PackageFilter.Local); } [TearDown] public void TearDown() { PackageCollection.Instance.OnFilterChanged -= OnFilterChangeEvent; PackageCollection.Instance.OnPackagesChanged -= OnPackagesChangeEvent; } [Test] public void Constructor_Instance_FilterIsLocal() { Assert.AreEqual(PackageFilter.Local, PackageCollection.Instance.Filter); } [Test] public void Constructor_Instance_PackageInfosIsEmpty() { Assert.IsEmpty(PackageCollection.Instance.PackageInfos); } [Test] public void SetFilter_WhenFilterChange_FilterChangeEventIsPropagated() { var wasCalled = false; OnFilterChangeEvent = filter => { wasCalled = true; }; PackageCollection.Instance.OnFilterChanged += OnFilterChangeEvent; PackageCollection.Instance.SetFilter(PackageFilter.All, false); Assert.IsTrue(wasCalled); } [Test] public void SetFilter_WhenNoFilterChange_FilterChangeEventIsNotPropagated() { var wasCalled = false; OnFilterChangeEvent = filter => { wasCalled = true; }; PackageCollection.Instance.OnFilterChanged += OnFilterChangeEvent; PackageCollection.Instance.SetFilter(PackageFilter.Local, false); Assert.IsFalse(wasCalled); } [Test] public void SetFilter_WhenFilterChange_FilterIsChanged() { PackageCollection.Instance.SetFilter(PackageFilter.All, false); Assert.AreEqual(PackageFilter.All, PackageCollection.Instance.Filter); } [Test] public void SetFilter_WhenNoFilterChangeRefresh_PackagesChangeEventIsNotPropagated() { var wasCalled = false; OnPackagesChangeEvent = packages => { wasCalled = true; }; PackageCollection.Instance.OnPackagesChanged += OnPackagesChangeEvent; PackageCollection.Instance.SetFilter(PackageFilter.Local); Assert.IsFalse(wasCalled); } [Test] public void SetFilter_WhenFilterChangeNoRefresh_PackagesChangeEventIsNotPropagated() { var wasCalled = false; OnPackagesChangeEvent = packages => { wasCalled = true; }; PackageCollection.Instance.OnPackagesChanged += OnPackagesChangeEvent; PackageCollection.Instance.SetFilter(PackageFilter.All, false); Assert.IsFalse(wasCalled); } [Test] public void SetFilter_WhenNoFilterChangeNoRefresh_PackagesChangeEventIsNotPropagated() { var wasCalled = false; OnPackagesChangeEvent = packages => { wasCalled = true; }; PackageCollection.Instance.OnPackagesChanged += OnPackagesChangeEvent; PackageCollection.Instance.SetFilter(PackageFilter.Local, false); Assert.IsFalse(wasCalled); } [Test] public void SetPackageInfos_PackagesChangeEventIsPropagated() { var wasCalled = false; OnPackagesChangeEvent = packages => { wasCalled = true; }; PackageCollection.Instance.OnPackagesChanged += OnPackagesChangeEvent; PackageCollection.Instance.SetListPackageInfos(Enumerable.Empty()); Assert.IsTrue(wasCalled); } [Test] public void AddPackageInfos_PackagesChangeEventIsPropagated() { var wasCalled = false; OnPackagesChangeEvent = packages => { wasCalled = true; }; PackageCollection.Instance.OnPackagesChanged += OnPackagesChangeEvent; PackageCollection.Instance.SetListPackageInfos(Enumerable.Empty()); Assert.IsTrue(wasCalled); } [Test] public void AddPackageInfo_PackagesChangeEventIsPropagated() { var wasCalled = false; OnPackagesChangeEvent = packages => { wasCalled = true; }; PackageCollection.Instance.OnPackagesChanged += OnPackagesChangeEvent; var info = new PackageInfo() { Name = kPackageTestName, Version = new SemVersion(1,0,0), IsCurrent = true, Group = "Test", Errors = new List() }; PackageCollection.Instance.AddPackageInfo(info); Assert.IsTrue(wasCalled); } [Test] public void ClearPackages_PackagesChangeEventIsPropagated() { var wasCalled = false; OnPackagesChangeEvent = packages => { wasCalled = true; }; PackageCollection.Instance.OnPackagesChanged += OnPackagesChangeEvent; PackageCollection.Instance.ClearPackages(); Assert.IsTrue(wasCalled); } } } PackageCollectionTests#UnityEditor.PackageManager.UI.Tests&Unity.PackageManagerUI.EditorTests.dll