Example #1
0
            public void ReturnsFalseIfExpiryDateIsUnset()
            {
                var instance = new Ambassador.Plugins.Moderation.Model.UserBan
                               (
                    new Server(0),
                    new User(0),
                    new User(1),
                    string.Empty
                               );

                Assert.False(instance.IsTemporary);
            }
Example #2
0
        public void ReturnsFalseIfExpiryDateIsUnset()
        {
            var instance = new Ambassador.Plugins.Moderation.Model.UserBan
                           (
                new Server(new Snowflake(0)),
                new User(new Snowflake(0)),
                new User(new Snowflake(1)),
                string.Empty
                           );

            Assert.False(instance.ExpiresOn.HasValue);
        }
Example #3
0
            public void ReturnsTrueIfExpiryDateIsSet()
            {
                var instance = new Ambassador.Plugins.Moderation.Model.UserBan
                               (
                    new Server(0),
                    new User(0),
                    new User(1),
                    string.Empty,
                    expiresOn: DateTime.UtcNow
                               );

                Assert.True(instance.IsTemporary);
            }
Example #4
0
        public void ReturnsTrueIfExpiryDateIsSet()
        {
            var instance = new Ambassador.Plugins.Moderation.Model.UserBan
                           (
                new Server(new Snowflake(0)),
                new User(new Snowflake(0)),
                new User(new Snowflake(1)),
                string.Empty,
                expiresOn: DateTimeOffset.UtcNow
                           );

            Assert.True(instance.ExpiresOn.HasValue);
        }