public void SetGridPaintSortingType_CanGetComparer(Type type) { EditorPrefs.SetString(GridPaintActiveTargetsPreferences.targetSortingModeEditorPref, type.FullName); var comparer = GridPaintActiveTargetsPreferences.GetTargetComparer(); Assert.NotNull(comparer); Assert.AreEqual(type, comparer.GetType()); }
public void SetGridPaintSortingMethod_CanGetComparer(Type type, string methodName) { EditorPrefs.SetString(GridPaintActiveTargetsPreferences.targetSortingModeEditorPref, CombineTypeAndMethodName(type, methodName)); var comparer = GridPaintActiveTargetsPreferences.GetTargetComparer(); Assert.NotNull(comparer); Assert.AreEqual(type, comparer.GetType()); }
public void SetCreateTileFromPalette_CanGetMethod(Type type, string methodName) { EditorPrefs.SetString(GridPaintActiveTargetsPreferences.createTileFromPaletteEditorPref, CombineTypeAndMethodName(type, methodName)); var method = type.GetMethod(methodName, BindingFlags.Static | BindingFlags.Public); var paletteMethod = GridPaintActiveTargetsPreferences.GetCreateTileFromPaletteUsingPreferences(); Assert.NotNull(paletteMethod); Assert.AreEqual(method, paletteMethod); }
public void DefaultCreateTileFromPalette_IsDefaultTile() { var method = typeof(TileUtility).GetMethod("DefaultTile", BindingFlags.Static | BindingFlags.Public); Assert.AreEqual(method, GridPaintActiveTargetsPreferences.GetCreateTileFromPaletteUsingPreferences()); }
public void DefaultGridPaintSorting_IsNull() { Assert.IsNull(GridPaintActiveTargetsPreferences.GetTargetComparer()); }