| | | 1 | | using System; |
| | | 2 | | using System.Reflection; |
| | | 3 | | using FastMigrations.Runtime; |
| | | 4 | | using Newtonsoft.Json; |
| | | 5 | | using Newtonsoft.Json.Linq; |
| | | 6 | | |
| | | 7 | | namespace FastMigrations.Tests.EditorMode |
| | | 8 | | { |
| | | 9 | | public sealed class FastMigrationsConverterMock : FastMigrationsConverter |
| | | 10 | | { |
| | | 11 | | public int ReadJsonCalledCount; |
| | | 12 | | |
| | | 13 | | public int WriteJsonCalledCount; |
| | | 14 | | |
| | | 15 | | public FastMigrationsConverterMock(MigratorMissingMethodHandling methodHandling) |
| | 69 | 16 | | : base(methodHandling) { } |
| | | 17 | | |
| | | 18 | | public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) |
| | 2 | 19 | | { |
| | 2 | 20 | | WriteJsonCalledCount++; |
| | 2 | 21 | | base.WriteJson(writer, value, serializer); |
| | 2 | 22 | | } |
| | | 23 | | |
| | | 24 | | public override object ReadJson(JsonReader reader, Type objectType, object existingValue, |
| | | 25 | | JsonSerializer serializer) |
| | 32 | 26 | | { |
| | 32 | 27 | | ReadJsonCalledCount++; |
| | 32 | 28 | | return base.ReadJson(reader, objectType, existingValue, serializer); |
| | 31 | 29 | | } |
| | | 30 | | } |
| | | 31 | | } |