public void DeletePlanContainer_Non_Existent_Container_Succeeds()
        {
            // Arrange
            Guid        containerUId = Guid.NewGuid();
            DynamoDbDal dal          = new DynamoDbDal
            {
                ContainerTable = _containerTable
            };

            // Act
            // Assert
            Assert.DoesNotThrow(() => dal.DeletePlanContainer(containerUId));
        }
        public void DeletePlanContainer_Null_Container_Table_Throws_Exception()
        {
            // Arrange
            Guid        containerUId = Guid.NewGuid();
            DynamoDbDal dal          = new DynamoDbDal
            {
                ContainerTable = ""
            };

            // Act
            Exception ex = Assert.Throws <Exception>(() => dal.DeletePlanContainer(containerUId));

            // Assert
            StringAssert.AreEqualIgnoringCase(ex.Message, "Plan container table name must be specified.");
        }
        public void DeletePlanContainer_Non_Existent_Table_Throws_Exception()
        {
            // Arrange
            Guid        containerUId = Guid.NewGuid();
            DynamoDbDal dal          = new DynamoDbDal
            {
                ContainerTable = "XXXXXX"
            };

            // Act
            Exception ex = Assert.Throws <ResourceNotFoundException>(() => dal.DeletePlanContainer(containerUId));

            // Assert
            StringAssert.Contains("Requested resource not found: Table", ex.Message);
        }
        public void DeletePlanContainer_Empty_UId_Throws_Exception()
        {
            // Arrange
            Guid        containerUId = Guid.Empty;
            DynamoDbDal dal          = new DynamoDbDal
            {
                ContainerTable = _containerTable
            };

            // Act
            Exception ex = Assert.Throws <Exception>(() => dal.DeletePlanContainer(containerUId));

            // Assert
            StringAssert.AreEqualIgnoringCase("Plan container unique id cannot be empty.", ex.Message);
        }
        public void DeletePlanContainer_Existing_Container_Succeeds()
        {
            // Arrange
            Guid containerUId = Guid.NewGuid();

            ;
            PlanContainer container = new PlanContainer()
            {
                UId  = containerUId,
                Name = _containerPrefix + containerUId
            };
            DynamoDbDal dal = new DynamoDbDal
            {
                ContainerTable = _containerTable
            };

            // Act
            dal.UpsertPlanContainer(container);

            Assert.DoesNotThrow(() => dal.DeletePlanContainer(containerUId));
        }