Esempio n. 1
0
        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");
        }
Esempio n. 2
0
        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");
        }
Esempio n. 3
0
        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());
        }
Esempio n. 4
0
        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);
        }
Esempio n. 5
0
        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");
        }
Esempio n. 6
0
        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");
        }