Пример #1
0
        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);
        }
Пример #2
0
        public void DefaultCreateTileFromPalette_IsDefaultTile()
        {
            var method = typeof(TileUtility).GetMethod("DefaultTile", BindingFlags.Static | BindingFlags.Public);

            Assert.AreEqual(method, GridPaintActiveTargetsPreferences.GetCreateTileFromPaletteUsingPreferences());
        }