コード例 #1
0
        public static async Task GetAllSynonyms_WhenEnumerated_ContainsNoValues()
        {
            var provider    = new EmptyDatabaseSynonymProvider();
            var hasSynonyms = await provider.GetAllSynonyms().AnyAsync().ConfigureAwait(false);

            Assert.That(hasSynonyms, Is.False);
        }
コード例 #2
0
        public static async Task GetSynonym_GivenValidName_ReturnsNone()
        {
            var provider      = new EmptyDatabaseSynonymProvider();
            var synonym       = provider.GetSynonym("synonym_name");
            var synonymIsNone = await synonym.IsNone.ConfigureAwait(false);

            Assert.That(synonymIsNone, Is.True);
        }
コード例 #3
0
        public static void GetSynonym_GivenNullName_ThrowsArgumentNullException()
        {
            var provider = new EmptyDatabaseSynonymProvider();

            Assert.That(() => provider.GetSynonym(null), Throws.ArgumentNullException);
        }