Граф коммитов

45 Коммитов

Автор SHA1 Сообщение Дата
Scott Bilas 0b14f20deb Avoid patching signed assemblies (which causes security violation), plus some cleanup
We probably will want to reenable patching of signed assemblies in the future, but it isn't important now. To get it working, will probably either have to do one of:

* Mess around with assembly loading/resolving callbacks to bypass the security check for patched assemblies, if possible
* While patching, adjust any references to patched assemblies to make them weak (remove public key)
* Restrict this functionality to only work on runtimes we can fully control (mono, possibly dotnetcore) - last resort
2018-11-21 15:53:12 +01:00
Scott Bilas 1e9caabdd2 Added a couple todos for commented out code that I can't remember why 2018-11-21 15:50:01 +01:00
Scott Bilas 0165b7d53b .NET 3.5 is way outdated, don't have to worry about it any more, seems .net standard 2 is what we want for unity and general 2018-11-21 15:48:31 +01:00
Scott Bilas 82d08dff64 Reenable icalls..can't remember why this wasn't working before. Also add in a test that icalls are being used. 2018-11-21 15:48:03 +01:00
Scott Bilas 455f4dafc0 Debug help 2018-11-21 15:46:21 +01:00
Scott Bilas 50aefd0765 Minor naming fixes and cleaning 2018-11-21 15:46:01 +01:00
Scott Bilas b0e69eea0f Let's commit some Rider stuff 2018-11-21 11:55:26 +01:00
Scott Bilas 1d3cd92503 Some design changes, greening and overhaul of tests
* Using new test-filesystem fixture to fully isolate dll's from the rest of the tooling - we should only have the test dll, the system(s) under test and their dependencies, and the mock types dll.
* Ensuring that the mock types dll is available to whatever we're patching, for peverify and any other tooling that can't be instructed where to find it
* Fixed messy and confusing list of assembly paths passed in to the patcher. Will do a more explicit and different way in future..probably an exclusion list or maybe a filter callback.
* Small improvements like switching to NiceIO where possible, using flags enum for options, tuning PE verification, simplifying mock type management, breaking out methods, reusing utilities, fixing bugs along the way
2018-11-07 17:22:47 +01:00
Scott Bilas bd47b10bc6 Minor 2018-11-07 14:32:33 +01:00
Scott Bilas a09c9ac121 Updated PeVerify to run on top of utility class, and also moving it to core code, as it's needed outside of tests 2018-11-07 14:31:52 +01:00
Scott Bilas ca85ecb24f Various copy pastes from the other Unity.Core project to get in sync
Also removed unnecessary [TestFixture] attrs
2018-11-07 14:30:54 +01:00
Scott Bilas 3b8bff6424 Let's start using NiceIO instead of strings and File.IO 2018-11-07 14:29:05 +01:00
Scott Bilas ed09cd9bd3 Some nice vocab for our project 2018-11-07 14:28:27 +01:00
Scott Bilas d3cfc58a0d Updated to latest versions of packages 2018-11-07 14:28:05 +01:00
Scott Bilas b7a81ea28d Consistency in project files
Fixing a couple issues by adding properties to the common targets:

* Pain in the ass to keep all the csproj framework versions in sync. So just update one place.
* All the csprojs were missing DEBUG being #defined as well as pdb generation (which shouldly was complaining about).
2018-11-07 14:25:08 +01:00
Scott Bilas 12c7f1b1b1 Cool, NSubstitute latest works just fine 2018-08-02 13:50:44 +02:00
Scott Bilas a4a3697432 Update all packages except NSubstitute 2018-08-02 13:49:23 +02:00
Scott Bilas ca44e7591d Update to latest 2018-08-02 13:46:49 +02:00
Scott Bilas 6943026714 Merge remote-tracking branch 'origin/mockCtorIntegration' 2018-08-02 13:42:28 +02:00
Scott Bilas ead6b54b39 New utilities and tests 2018-08-02 12:00:32 +02:00
Gabriele Farina 3ad46aa9dd Updated Shoudly to newest, mac-compatible, version 2018-08-02 11:57:13 +02:00
Gabriele Farina f1683908b5 Added packages required to run unit tests in Rider 2018-08-02 11:50:51 +02:00
nicklas 941bcb8109 PatchedAssemblyBridge is now injected into all methods and can intercept
the calls to the specified method. Still tests are failing, however this
should be fixable.
2018-02-26 16:43:57 +01:00
Scott Bilas d252809c8d New ExpandTabs feature w/ tests 2018-02-15 13:01:20 +01:00
miniwolf 4738a26df8 More tests are working. 2018-02-12 16:24:58 +01:00
miniwolf 77f27bf7fc Autohook setup is patching assemblies using white list. 2018-02-12 15:23:45 +01:00
nicklas 861606280b Trial version attempting to integrate patching of test assembly, introducing
extra constructor with MockPlaceholderType.
2018-02-05 16:40:56 +01:00
nicklas e800555eae Custom peverify process creation, as the PeVerify complains. 2018-02-05 16:39:58 +01:00
Scott Bilas d7eb93f1eb Temp stuff, will delete after patcher is finished 2017-10-28 15:25:10 +02:00
Scott Bilas 68364a07be Added PEVerify support and fixed code and tests to verify clean 2017-10-28 15:00:20 +02:00
Scott Bilas 803bea07b5 Misc small cleanup 2017-10-28 14:58:54 +02:00
Scott Bilas 9a7b41a2c3 Ok so it looks like StructLayoutAttribute melts away and converts to metadata 2017-10-27 19:30:38 +02:00
Scott Bilas 7ca0a146b9 Loads of iteration on tests, patcher, Core inclusion.. 2017-10-27 17:54:34 +02:00
Scott Bilas ba1b3d8dd1 Basic tests with hacked in patching now pass! Time to write a real patcher. 2017-10-25 13:20:21 +02:00
Scott Bilas 2fe2c323c1 Ready to start working on getting tests for hard coded mocks green (also formatted) 2017-10-25 12:50:27 +02:00
Scott Bilas 27fd87d111 Lots of rearranging and iterating, mostly committing for backup before next stage (invocation reentry) 2017-10-25 12:32:06 +02:00
Scott Bilas 4760208090 Working towards proper integration of elevated mocks with nsub (still much to do) 2017-10-24 19:03:47 +02:00
Scott Bilas 404d9c6e55 New name for project (isn't going to be Unity-specific), and started working on hook 2017-10-24 11:54:09 +02:00
Scott Bilas 0aa36634a4 Bit of whitespace fun 2017-10-24 09:43:50 +02:00
Scott Bilas 90258be15a m,inor 2017-10-23 19:25:29 +02:00
Scott Bilas 1476f1d3fd Improvements to test names
Also added in a couple tests that make sure we're still working with vanilla NSubstitute
2017-10-23 19:19:38 +02:00
Scott Bilas 3dbd51df82 Helpful to keep things formatted in gitland (still needs a way to ignore gen'd files) 2017-10-23 19:19:06 +02:00
Scott Bilas cc4424bd3a Ignore files consistency with common targets file
Also just got rid of .netstandard for now in the main tooling. Keep it simple. Stuff like nunit isn't ready for it and I don't want to fight.
2017-10-23 19:18:23 +02:00
Scott Bilas ec650d8170 Seeding - moving over other test data to get going 2017-10-23 18:29:14 +02:00
Scott Bilas 8ec595dbb0 New repo 2017-10-23 18:26:06 +02:00