Ejemplo n.º 1
0
        public void ConditionHoldsShouldThrowExceptionWhenContextIsNotProvided()
        {
            // Arrange
            var now       = DateTime.UtcNow;
            var condition = new InstallationsCondition("INSTALLATION#1", "INSTALLATION#2");

            // Act

            // Assert
            Assert.Throws <ArgumentNullException>(() => condition.Holds(null));
        }
Ejemplo n.º 2
0
        public void ConditionHoldsShouldReturnTrueWhenInstallationIsInInstallationsCollection()
        {
            // Arrange
            var installation = "SAMPLE_INSTALLATION";
            var condition    = new InstallationsCondition("INSTALLATION#1", "INSTALLATION#2", "SAMPLE_INSTALLATION");
            var context      = new Context(null, null, installation);

            // Act
            var conditionHolds = condition.Holds(context);

            // Assert
            Assert.True(conditionHolds);
        }