Closed Maximusya closed 10 years ago
Added Aspect unit tests calls to Program.cs - but do we really need this self-made console test runner? Nunit has it's own, Mstest too. New Visual Studios even come with "universal" test runner: vstest.console.exe. Resharper, NCrunch etc - for testing during development.
I think we're testing it this way because of Travis CI
Travis CI runs NUnit test runner over ArtemisMonoUnitTests.dll:
xbuild Artemis_Mono/Artemis_Mono.sln nunit-console Artemis_Mono/bin/Debug/ArtemisMonoUnitTests.dll
Thus Program.Main is not executed - just the methods marked with [Test] attribute. So my guess - Program.cs is a convinience method to run tests during development in some limited environments without any test runners installed into IDE or OS.
Implemented base unit tests in order to cover recently discovered issue #73
While writing the tests, I first assumed that empty
Entity
(i.e. no components) is subject toAspect.Empty
, but failed test and subsequent research convinced me of the opposite - thus I updated relevant xml docs and added a note for the test to clarifyAspect.Empty
purpose.Note that I omitted any "invalid arguments" tests such as null Entity:
Debug.Assert
already describes methods' contracts.