public void RuntimeAggregateExceptionTest() { IOptionalInterface duck = DuckTyping.Aggregate <IOptionalInterface>(new TestClass(), new EmptyClass()); Assert.AreEqual(1, duck.RequiredMethod()); // Exception here. // duck.OptionalMethod(); }
public void RuntimeExceptionTest() { IOptionalInterface duck = DuckTyping.Implement <IOptionalInterface>(new TestClass()); Assert.AreEqual(1, duck.RequiredMethod()); // Exception here. // duck.OptionalMethod(); }
public void BuildtimeAggregateExceptionTest() { // Exception here. // IOptionalInterface duck1 = DuckTyping.Aggregate <IOptionalInterface>(string.Empty, Guid.Empty); }
public void BuildtimeExceptionTest() { // Exception here. // IOptionalInterface duck1 = DuckTyping.Implement <IOptionalInterface> (string.Empty); }