예제 #1
0
 public void WorkerBase_should_accept_an_arbitrary_WorkerId()
 {
     Assert.DoesNotThrow(() =>
     {
         var worker = new UnityTestWorker("worker-id", new Vector3());
         worker.Dispose();
     });
 }
예제 #2
0
        public void WorkerBase_should_throw_exception_when_WorkerId_is_null_or_empty()
        {
            // Empty check
            var empty_exception = Assert.Throws <System.ArgumentException>(() =>
            {
                var worker = new UnityTestWorker("", new Vector3());
                worker.Dispose();
            });

            Assert.IsTrue(empty_exception.Message.Contains("WorkerId"));

            // Null check
            var null_exception = Assert.Throws <System.ArgumentException>(() =>
            {
                var worker = new UnityTestWorker(null, new Vector3());
                worker.Dispose();
            });

            Assert.IsTrue(null_exception.Message.Contains("WorkerId"));
        }
예제 #3
0
 public void TearDown()
 {
     worker.Dispose();
 }