public void Test_3() { using (var app = new AzosApplication(null, BASE_CONF)) { var obj = new NeedsBoth(); app.InjectInto(obj); Aver.AreEqual(100, obj.A.ValueOfA); Aver.AreEqual(-1000, obj.B.ValueOfB); } }
public void Test_4() { using (var app = new AzosApplication(null, BAD_CONF)) { var obj = new NeedsBoth(); try { app.InjectInto(obj); } catch (DependencyInjectionException e) { new WrappedExceptionData(e).See(); return; } Aver.Fail(Constants.ERR_NOT_THROWN); //because NeedsBoth requires A and B } }
public void Test_4() { using (var app = new AzosApplication(null, BAD_CONF)) { var obj = new NeedsBoth(); try { app.InjectInto(obj); } catch (DependencyInjectionException e) { new WrappedExceptionData(e).See(); return; } Aver.Fail("Expected exception was not thrown"); //because NeedsBoth requires A and B } }