public void ForAFuncOf() { var myObject = new AClass(); var myString = "String!"; // var uut = new AnythingActivator(DefaultRules.All.After(new ActivateInstances(myObject, myString))); var result1 = uut.New <Func <AClass> >(); var result2 = uut.New <Func <string> >(); //Debug xconsole.WriteLine(string.Join(Environment.NewLine, uut.LastErrorList)); xconsole.WriteLine(string.Join(Environment.NewLine, uut.LastActivationTree)); // Assert.That(result1, x => x() == myObject); Assert.That(result2, x => x() == myString); }
public void AndAABuildsRequestedType() { var activator = new AnythingActivator(this); var wrappable = activator.New <IWrappable>(); wrappable.ShouldNotBeNull() .ShouldBeAssignableTo <IWrappable>() .ShouldBeOfType <WrappableBackstop>(); }
protected TestBaseFor() { Activator = new AnythingActivator(this); UnitUnderTest = Activator.New <T>(); }