public TypeFacade(ITypeSpec spec, IFrameworkFacade frameworkFacade, INakedObjectsFramework framework) { FacadeUtils.AssertNotNull(spec, "Spec is null"); FacadeUtils.AssertNotNull(frameworkFacade, "FrameworkFacade is null"); FacadeUtils.AssertNotNull(framework, "framework is null"); FrameworkFacade = frameworkFacade; this.spec = spec; this.framework = framework; }
public AssociationFacade(IAssociationSpec assoc, IFrameworkFacade frameworkFacade, INakedObjectsFramework framework) { FacadeUtils.AssertNotNull(assoc, "Assoc is null"); FacadeUtils.AssertNotNull(framework, "framework is null"); FacadeUtils.AssertNotNull(frameworkFacade, "FrameworkFacade is null"); this.assoc = assoc; this.framework = framework; FrameworkFacade = frameworkFacade; }
protected ObjectFacade(INakedObjectAdapter nakedObject, IFrameworkFacade frameworkFacade, INakedObjectsFramework framework) { FacadeUtils.AssertNotNull(nakedObject, "NakedObject is null"); FacadeUtils.AssertNotNull(frameworkFacade, "FrameworkFacade is null"); FacadeUtils.AssertNotNull(framework, "framework is null"); WrappedNakedObject = nakedObject; this.framework = framework; FrameworkFacade = frameworkFacade; }
public ActionParameterFacade(IActionParameterSpec nakedObjectActionParameter, IFrameworkFacade frameworkFacade, INakedObjectsFramework framework, string overloadedUniqueId) { FacadeUtils.AssertNotNull(nakedObjectActionParameter, "Action Parameter is null"); FacadeUtils.AssertNotNull(framework, "framework is null"); FacadeUtils.AssertNotNull(overloadedUniqueId, "overloadedUniqueId is null"); FacadeUtils.AssertNotNull(frameworkFacade, "FrameworkFacade is null"); WrappedSpec = nakedObjectActionParameter; this.framework = framework; this.overloadedUniqueId = overloadedUniqueId; FrameworkFacade = frameworkFacade; }
private static T MapErrors <T>(Func <T> f) { try { return(f()); } catch (NakedObjectsFacadeException) { throw; } catch (Exception e) { throw FacadeUtils.Map(e); } }
public ActionFacade(IActionSpec action, IFrameworkFacade frameworkFacade, INakedObjectsFramework framework, string overloadedUniqueId) { FacadeUtils.AssertNotNull(action, "Action is null"); FacadeUtils.AssertNotNull(framework, "framework is null"); FacadeUtils.AssertNotNull(overloadedUniqueId, "overloadedUniqueId is null"); FacadeUtils.AssertNotNull(frameworkFacade, "FrameworkFacade is null"); WrappedSpec = action; this.framework = framework; this.overloadedUniqueId = overloadedUniqueId; FrameworkFacade = frameworkFacade; }
public TestRunState Run(ITestListener testListener, string assemblyFile, string cref) { if (testListener == null) { throw new ArgumentNullException("testListener"); } if (assemblyFile == null) { throw new ArgumentNullException("assemblyFile"); } FacadeOptions options = FacadeOptions.ReadFromRegistry(); FacadeTestRunState result = TestRunner.Run(new AdapterFacadeTestListener(testListener), assemblyFile, cref, options); return(FacadeUtils.ToTestRunState(result)); }
public TestRunState RunAssembly(ITestListener testListener, Assembly assembly) { if (testListener == null) { throw new ArgumentNullException("testListener"); } if (assembly == null) { throw new ArgumentNullException("assembly"); } FacadeOptions options = FacadeOptions.ReadFromRegistry(); FacadeTestRunState result = TestRunner.Run(new AdapterFacadeTestListener(testListener), GetAssemblyPath(assembly), null, options); return(FacadeUtils.ToTestRunState(result)); }
public VersionFacade(IVersion version) { FacadeUtils.AssertNotNull(version, "Version is null"); this.version = version; }
public IActionFacade[] GetActionLeafNodes() { var actionsAndUid = FacadeUtils.GetActionsandUidFromSpec(spec); return(actionsAndUid.Select(a => new ActionFacade(a.Item1, FrameworkFacade, framework, a.Item2 ?? "")).Cast <IActionFacade>().ToArray()); }
public OidFacade(IOid oid) { FacadeUtils.AssertNotNull(oid, "Oid is null"); this.oid = oid; }
public ConsentFacade(IConsent consent) { FacadeUtils.AssertNotNull(consent, "Consent is null"); this.consent = consent; }
public ObjectContextFacade[] GetServices() { return(MapErrors(() => FacadeUtils.GetServicesInternal().Select(s => new ObjectContext(s).ToObjectContextFacade(this)).ToArray())); }
public string getName() { return(FacadeUtils.MakeSpaced(FacadeUtils.Capitalize(id))); }