public void ConditionHoldsShouldThrowExceptionWhenContextIsNotProvided() { // Arrange var now = DateTime.UtcNow; var condition = new UsersCondition("USER#1", "USER#2"); // Act // Assert Assert.Throws <ArgumentNullException>(() => condition.Holds(null)); }
public void ConditionHoldsShouldReturnTrueWhenUserIsInUsersCollection() { // Arrange var user = "******"; var condition = new UsersCondition("USER#1", "USER#2", "SAMPLE_USER"); var context = new Context(null, user, null); // Act var conditionHolds = condition.Holds(context); // Assert Assert.True(conditionHolds); }