//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ public static Instance FromCreateFabInstance(CreateFabInstance pApi) { var dom = new Instance(); FromCreateFabInstance(dom, pApi); return(dom); }
/*--------------------------------------------------------------------------------------------*/ private static void FromCreateFabInstance(Instance pDomain, CreateFabInstance pApi) { FromCreateFabArtifact(pDomain, pApi); pDomain.Name = pApi.Name; pDomain.Disamb = pApi.Disamb; pDomain.Note = pApi.Note; }
//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ public FabricRequest <FabResponse <FabInstance> > Request(CreateFabInstance Data, SessionType UseSessionType = SessionType.Default) { return(new FabricRequest <FabResponse <FabInstance> >("POST", Uri, null, "Data=" + Data.ToJson() )); }
//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ protected override void TestSetUp() { base.TestSetUp(); vCreateInstance = new CreateFabInstance(); vCreateInstance.Name = "integration test"; vCreateInstance.Disamb = "a new class"; vCreateInstance.Note = "creating a class"; }
public void Instance() { var obj = new CreateFabInstance(); obj.Name = "instance test"; BrowserResponse br = PostCreate("mod/instances", obj); FabInstance result = AssertFabResponseData <FabInstance>(br); Assert.AreEqual(obj.Name, result.Name, "Incorrect result."); NewVertexCount = 1; NewEdgeCount = 2; }
//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ public static void InstanceAfterSessionStart(CreateOperationTasks pTasks, ICreateOperationBuilder pBuild, Instance pNewDom, CreateFabInstance pNewCre) { if (pNewDom.Name == null && pNewDom.Disamb != null) { throw new FabPropertyValueFault("Name", null, "Cannot be null when Disamb is specified."); } }
/*--------------------------------------------------------------------------------------------*/ public FabResponse <FabInstance> Post(CreateFabInstance Data, SessionType UseSessionType = SessionType.Default) { return(Request(Data).Send(vContext, UseSessionType)); }
//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ public CreateFabInstanceValidator(CreateFabInstance pCreateObj) : base(pCreateObj) { vCreateObj = pCreateObj; }