public void AddSearchSpace_NullConnectionServer_Failure() { SearchSpace oSearchSpace; var res = SearchSpace.AddSearchSpace(null, out oSearchSpace, "name"); Assert.IsFalse(res.Success, "Static method for add SearchSpace did not fail with null ConnectionServer"); }
public void AddSearchSpace_EmptyName_Failure() { SearchSpace oSearchSpace; var res = SearchSpace.AddSearchSpace(_mockServer, out oSearchSpace, ""); Assert.IsFalse(res.Success, "Static method for add SearchSpace did not fail with empty name"); }
public void AddSearchSpace_InvalidLocationId_Failure() { SearchSpace oSearchSpace; //invalid locaiton var res = SearchSpace.AddSearchSpace(_connectionServer, out oSearchSpace, "name", "description", "boguslocation"); Assert.IsFalse(res.Success, "Static method for add SearchSpace did not fail with invalid Location"); }
public new static void MyClassInitialize(TestContext testContext) { BaseIntegrationTests.MyClassInitialize(testContext); string strName = "Temp_" + Guid.NewGuid().ToString(); WebCallResult res = SearchSpace.AddSearchSpace(_connectionServer, out _searchSpace, strName, "SearchSpace added by Unit Test"); Assert.IsTrue(res.Success, "Creation of new SearchSpace failed"); strName = "Temp_" + Guid.NewGuid().ToString(); res = Partition.AddPartition(_connectionServer, out _partition, strName, "Partition added by Unit Test"); Assert.IsTrue(res.Success, "Creation of new partition failed"); }
public void AddSearchSpace_ErrorResponse_Failure() { Reset(); _mockTransport.Setup(x => x.GetCupiResponse(It.IsAny <string>(), MethodType.POST, It.IsAny <ConnectionServerRest>(), It.IsAny <string>(), It.IsAny <bool>())).Returns(new WebCallResult { Success = false, ResponseText = "error text", StatusCode = 404 }); SearchSpace oSpace; var res = SearchSpace.AddSearchSpace(_mockServer, out oSpace, "Name", "Description", "LocaitonObjectId"); Assert.IsFalse(res.Success, "Calling AddSearchSpace with ErrorResponse did not fail"); }