public void AddEquipmentReturnsBadRequest()
        {
            Equipment equipment           = null;
            var       duplicateEquipement = new Equipment {
                EquipmentName = "FF_Boiler1", EquipmentType = "Boiler", PlantId = 5, CreatedBy = "Admin", ModifiedBy = "Admin"
            };
            var controller = new PlantConfigurationController();
            // Act

            var actionResult  = controller.AddEquipment(equipment);
            var actionResult1 = controller.AddEquipment(duplicateEquipement);

            //Assert
            Assert.IsInstanceOfType(actionResult, typeof(BadRequestErrorMessageResult));
            Assert.IsInstanceOfType(actionResult1, typeof(BadRequestErrorMessageResult));
        }
        public void AddEquipmentReturnsCreated()
        {
            //Act
            var equip      = getEquipment();
            var item       = new PlantInfo().RetrieveAsset().LastOrDefault();
            var i          = item.ID;
            var controller = new PlantConfigurationController();

            //Act
            var actionResult  = controller.AddEquipment(equip);
            var createdresult = actionResult as CreatedNegotiatedContentResult <string>;

            //Assert

            Assert.IsNotNull(createdresult);
            Assert.AreEqual("api/PlantConfiguration/Equipment", createdresult.Location.OriginalString);
            Assert.AreEqual((i + 1).ToString(), createdresult.Content);
        }