//[ExpectedException(typeof(NodeNotFoundException))] public void Test1() { List <bool> answers = new List <bool>(); answers.Add(false); answers.Add(false); //_service.GetCurrentQuestion(answers); //ActualValueDelegate<object> testDelegate = () => _service.GetCurrentQuestion(answers); //Assert.That(testDelegate, Throws.TypeOf<NodeNotFoundException>()); //Assert.That(() => _service.GetCurrentQuestion(answers),Throws.TypeOf<NodeNotFoundException>()); //Assert.Throws<NodeNotFoundException>(() => _service.GetCurrentQuestion(answers)); var ex = Assert.Throws <NodeNotFoundException>(() => _service.GetCurrentQuestion(answers)); Assert.That(ex.Code == "DOEX404"); }