From 0e9119538d88fe464e7c25e49ff691b41afc92c0 Mon Sep 17 00:00:00 2001 From: Steve Vermeulen Date: Mon, 27 Aug 2018 14:52:14 +0800 Subject: [PATCH] Fixed AutoMocking Moq package --- Documentation/AutoMocking.md | 2 +- .../Editor}/AutoMocking.zip | Bin 475551 -> 475358 bytes .../Editor}/AutoMocking.zip.meta | 5 +++-- 3 files changed, 4 insertions(+), 3 deletions(-) rename UnityProject/Assets/Plugins/Zenject/OptionalExtras/{ => TestFramework/Editor}/AutoMocking.zip (99%) rename UnityProject/Assets/Plugins/Zenject/OptionalExtras/{ => TestFramework/Editor}/AutoMocking.zip.meta (56%) diff --git a/Documentation/AutoMocking.md b/Documentation/AutoMocking.md index 260c730c4..5350c3601 100644 --- a/Documentation/AutoMocking.md +++ b/Documentation/AutoMocking.md @@ -48,7 +48,7 @@ Then you can implement the fields of the IWebServer interface and configure them Zenject also allows you to even avoid having to write the MockWebServer class in favour of using a library called "Moq" which does all the work for you. -Note that by default, Auto-mocking is not enabled in Zenject. If you wish to use the auto-mocking feature then you need to go to your Zenject install directory and extract the contents of "Extras/ZenjectAutoMocking.zip". Note that there are multiple versions of Moq.dll included in the zip and that you should use the one that targets the Scripting Runtime Version that you have configured in your player settings. Also note that if you're using Scripting Runtime Version 3.5, that you might also need to change your "Api Compatibility Level" from ".NET 2.0 Subset" to ".NET 2.0" +Note that by default, Auto-mocking is not enabled in Zenject. If you wish to use the auto-mocking feature then you need to go to your Zenject install directory and extract the contents of "OptionalExtras\TestFramework\Editor\AutoMocking.zip" into that same directory. Note that there are multiple versions of Moq.dll included in the zip and that you should use the one that targets the Scripting Runtime Version that you have configured in your player settings. Also note that if you're using Scripting Runtime Version 3.5, that you might also need to change your "Api Compatibility Level" from ".NET 2.0 Subset" to ".NET 2.0" After extracting the auto mocking package it is just a matter of using the following syntax to mock out various parts of your project: diff --git a/UnityProject/Assets/Plugins/Zenject/OptionalExtras/AutoMocking.zip b/UnityProject/Assets/Plugins/Zenject/OptionalExtras/TestFramework/Editor/AutoMocking.zip similarity index 99% rename from UnityProject/Assets/Plugins/Zenject/OptionalExtras/AutoMocking.zip rename to UnityProject/Assets/Plugins/Zenject/OptionalExtras/TestFramework/Editor/AutoMocking.zip index f443989670a474729f28dc24dd83c1b7f180c975..815459d6d1973c126d8586b3ae51d3e0bd670730 100644 GIT binary patch delta 1079 zcmbQ=EPJm}RxZGsnMH(wfq{czVVjkAQi5~-+sVufQ|2%;@B&2}y;{8(TfLaJdNGSk zVG#m~OwXLcyp;tc*RDC08Hibcn0346R5rZ@5Cuu5?91vE%cOmC6cf6a0~Ou}VlE&K zN=;1hP1P%@DADaZo5$qH)BN6JPqX}jSJ4-;S2tCy_%`Vrn^|g^k&5KU&tJ|knVlpOFO;NHq4y0f8o^GAxDnP_}a338N=0Ct+EUIb7uQwd00N!J$1s&kB6Tv zVhzt#NH&QNN~x4+TkjKYmSZV);{Ns3bqPZ5OG}n8A6Cz;JQ8nT#JO0+rtHVoZP#te zeoa4Zzg)sD`-|$S*-Kv@?z6S)NwZrm+kRGKVHrCja9#rgr#E=-yB?rFHUTj|5KrG} z#=aHo=k1l|>@rL&;vm5Vmh5jtf`HzanSASA1tSAP88ZU|SZ28uyH7p$ZtLQ6Z)RHN z>#y&8w53I|aIV#sCoQ?RPbFUt$&A@rrPMVcQ_n+mrSuYOVeNa)4;Norccdpb+TEt% z=8E^{^5=fuXFbnhEgO5~gIh1-c&&=lgM#F5wKYEZtnhf!b|=wlp6~N-TsyYyz#5B4 zmpP4>=9#f~+bsPi5qzZbiicM4%=*RUOU@tB6gK?EV%RD5yUtzj?BVB;&9;Kel^vPi zYrZY|6nLmrWc9*?@5|RQX1+A6y>>w{{I*NqP8X+>k*ti}xr=6MYFxK+=?qx#KqY@6 zOKzRjj;zqjE=rl-leL4ds$bSH%t_f5{dj@a-kW#MSq1&r=;f|CW!KZTd3h}JJmn9& zERf@dK@90GPbGt6RerND|x{eLIG>Z%GX?s?4r{}?buDwbYBFjnx16G?kj|b|-txM2>9xUZ6TelIMcDh><~pA!eQ$=Ox=K(*x|;b%pp*oYrFoG<=#pyFZ$x zuI51TfA;J_LgFauQ!Rnwz$7O=y}^OqKnXM5A-gEm3aI#|1G_Tc+L?bq1^~BmWcdI9 delta 1218 zcmccDC_BGdRyDwznMH&F1f&}-_<$Kuf*nY^rev1n7wJ!s;s&XK@*3q@ zi%j8`L`Y0Go5H*mS!MhCDa=630>rG_-%nxFTY#cm(Ug5z{fjm$Z~w1f9Mgg3Gy}09 z!n~l=#1!9Dy^@L&)ow?w!v;Jo@7ew*$_Mkk)?Wp7H7UQPqGD?a9hdaxUkrIrz8x`HO?SAJmGc^@Xx^3AV{k z^-tujxUy+d;vx&R{m-Xd=9}JQ#xBJzhH%34Rc7p4ksZA~*_>U5iCYdyNwX#U8)@bG z3qCcU7~Jz285lB|85oci7}&6jPoHJQZd%`X_S_uf;tk*@CnKUQqfHcY;KO^`pq?A7ki(a-n1?^6$0eb7;E zN7=6M=5u#uPPx*)Em7g8&50dP)&?AvJ6tP#`_>Jy8N%w_9mWB-E^tE1jAwTO?eCJ}7F0N?rBb#$;(@(FLG2HL8Y^mY@MP5{vnhjatE@#A?66_AbX%cl*|WQAVy1Xxhc;Oul!Ma06tW|uKPAm|2Zp|BT_TX49^k;PCaH{Ko30ItcA4o* V9N2aExEZ(^+E^GEm~BCY696A!e)s?Y diff --git a/UnityProject/Assets/Plugins/Zenject/OptionalExtras/AutoMocking.zip.meta b/UnityProject/Assets/Plugins/Zenject/OptionalExtras/TestFramework/Editor/AutoMocking.zip.meta similarity index 56% rename from UnityProject/Assets/Plugins/Zenject/OptionalExtras/AutoMocking.zip.meta rename to UnityProject/Assets/Plugins/Zenject/OptionalExtras/TestFramework/Editor/AutoMocking.zip.meta index 778f56896..4837b0e3c 100644 --- a/UnityProject/Assets/Plugins/Zenject/OptionalExtras/AutoMocking.zip.meta +++ b/UnityProject/Assets/Plugins/Zenject/OptionalExtras/TestFramework/Editor/AutoMocking.zip.meta @@ -1,8 +1,9 @@ fileFormatVersion: 2 -guid: 8251a01fd33c17c4692cf0bebf5ac9a9 -timeCreated: 1510810097 +guid: 0c89973744c794a49a115e1bf158fab5 +timeCreated: 1535352565 licenseType: Free DefaultImporter: + externalObjects: {} userData: assetBundleName: assetBundleVariant: