/// <summary> ///A test for Construct ///</summary> public void ConstructTestHelper <T>() { AbstractObjectBuilder <T> target = new AbstractObjectBuilder <T>(value); T actual; actual = target.Construct(type, null); Assert.IsNotNull(actual); }
private static void Method1ToBenchMark() { AbstractObjectBuilder<MockClass> builder = new AbstractObjectBuilder<MockClass>(new AssemblyBuilder(new CSharpProvider())); MockClass mock = builder.Construct(typeof(MockClass), null); Decorator decorator = new ObjectDecorator(new ObjectInstantiator()); decorator.Decorate<MockClass>(mock); double value = mock.GetZero(); }
public void ShouldInterruptTheAbstractMethodAndUseAttributeFunction() { AbstractObjectBuilder<MockClass> builder = new AbstractObjectBuilder<MockClass>(new AssemblyBuilder(new CSharpProvider())); MockClass mock = builder.Construct(typeof(MockClass), null); Decorator decorator = new ObjectDecorator(new ObjectInstantiator()); decorator.Decorate<MockClass>(mock); Assert.AreEqual("some1helpme", mock.DoSomeMagic("some", 1, "helpme")); }
/// <summary> ///A test for Construct ///</summary> public T ConstructDiscreteHelper <T>() { AbstractObjectBuilder <T> target = new AbstractObjectBuilder <T>(value); T actual; actual = target.Construct(type, null); Assert.IsNotNull(actual); return(actual); }
public void ShouldInterruptTheAbstractMethodAndUseAttributeFunction() { AbstractObjectBuilder <MockClass> builder = new AbstractObjectBuilder <MockClass>(new AssemblyBuilder(new CSharpProvider())); MockClass mock = builder.Construct(typeof(MockClass), null); Decorator decorator = new ObjectDecorator(new ObjectInstantiator()); decorator.Decorate <MockClass>(mock); Assert.AreEqual("some1helpme", mock.DoSomeMagic("some", 1, "helpme")); }
private static void Method1ToBenchMark() { AbstractObjectBuilder <MockClass> builder = new AbstractObjectBuilder <MockClass>(new AssemblyBuilder(new CSharpProvider())); MockClass mock = builder.Construct(typeof(MockClass), null); Decorator decorator = new ObjectDecorator(new ObjectInstantiator()); decorator.Decorate <MockClass>(mock); double value = mock.GetZero(); }