Пример #1
0
        public void ArchiveTestCheckIfTheObjectArchived()
        {
            //Arrange
            int    objID;
            Result list     = new Result();
            Client myClient = new Client(URL, APIKEY, LANGUAGE);

            myClient.Username = "******";
            myClient.Password = "******";
            Obj request = new Obj(myClient);

            //Act:Create the Object
            request.type       = ObjectType.ROUTER;
            request.title      = "HQ Gateway";
            request.cmdbStatus = CmdbStatus.DEFECT;
            objID = request.Create();

            //Act:Archive the Object
            request.Archive(objID);

            //Act:Read the Object
            list = request.Read(objID);

            //Assert
            Assert.AreEqual("3", list.status);
        }
Пример #2
0
        public void ArchiveTest()
        {
            //Arrange
            int    objID;
            Client myClient = new Client(URL, APIKEY, LANGUAGE);

            myClient.Username = "******";
            myClient.Password = "******";
            Obj request = new Obj(myClient);

            //Act
            request.type       = ObjectType.PRINTER;
            request.title      = "HQ Printer";
            request.cmdbStatus = CmdbStatus.INOPERATION;
            objID = request.Create();
            request.Archive(objID);
            //Assert
            Assert.IsNotNull(objID);
        }