public void AddClassOfService_NullConnectionServer_Failure() { ClassOfService oCos; WebCallResult res = ClassOfService.AddClassOfService(null, "display", null, out oCos); Assert.IsFalse(res.Success, "Static call to AddClassOfSerice did not fail with: null ConnectionServer"); }
public void StaticMethodFailures_AddClassOfService() { //AddClassOfService WebCallResult res = ClassOfService.AddClassOfService(null, "display", null); Assert.IsFalse(res.Success, "Static call to AddClassOfSerice did not fail with: null ConnectionServer"); res = ClassOfService.AddClassOfService(_connectionServer, "", null); Assert.IsFalse(res.Success, "Static call to AddClassOfSerice did not fail with: empty objectId"); }
public new static void MyClassInitialize(TestContext testContext) { BaseIntegrationTests.MyClassInitialize(testContext); //create new handler with GUID in the name to ensure uniqueness String strName = "TempCOS_" + Guid.NewGuid().ToString().Replace("-", ""); WebCallResult res = ClassOfService.AddClassOfService(_connectionServer, strName, null, out _tempCos); Assert.IsTrue(res.Success, "Failed creating temporary class of service:" + res.ToString()); }
public void AddClassOfServiceToTenant_Success() { ClassOfService oCos; var res = ClassOfService.AddClassOfService(_connectionServer, Guid.NewGuid().ToString(), null, out oCos); Assert.IsTrue(res.Success, "Failed to create new temporary COS"); Assert.IsNotNull(oCos, "Null COS returned from create"); res = _tempTenant.AddClassOfServiceToTenant(oCos.ObjectId); Assert.IsTrue(res.Success, "Adding COS to tenant failed:" + res); }
public void AddClassOfService_ErrorResponse_Failure() { _mockTransport.Setup(x => x.GetCupiResponse(It.IsAny <string>(), It.IsAny <MethodType>(), It.IsAny <ConnectionServerRest>(), It.IsAny <string>(), It.IsAny <bool>())).Returns(new WebCallResult { Success = false, ResponseText = "error text", }); ConnectionPropertyList oProps = new ConnectionPropertyList(); oProps.Add("Test", "Test"); var res = ClassOfService.AddClassOfService(_mockServer, "Display Name", oProps); Assert.IsFalse(res.Success, "Calling AddClassOfService with ErrorResponse did not fail"); }
public void AddClassOfService_EmptyObjectId_Failure() { var res = ClassOfService.AddClassOfService(_mockServer, "", null); Assert.IsFalse(res.Success, "Static call to AddClassOfSerice did not fail with: empty objectId"); }