Inheritance: IDomainFinder
Esempio n. 1
0
        public static ApprovedDomain FindDomainByTenant(string tenant)
        {
            var logger = Log.Logger;
            var serializer = GetSerializer();
            var convention = new ByConvention(logger, serializer);

            string defaultTenant = GetDefaultTenantName();

            var finder = new DomainFinder(serializer, convention);
            return finder.FindByTenant(tenant, defaultTenant);
        }
Esempio n. 2
0
        public void ShouldFindDomainByTenantName(string defaultSite, string synonym, string expectedDomain)
        {
            var logger = new FakeLogger();
            var serializer = new FakeDomainSerializer();
            var convention = new ByConvention(logger, serializer);

            var finder = new DomainFinder(serializer, convention);

            var found = finder.FindBySynonym(synonym, defaultSite);
            string result = found.DomainName;

            Assert.Equal(expectedDomain, result);
        }