Пример #1
0
        public void GetService_InvokeWithSite_ReturnsExpected(Type serviceType, Type result)
        {
            var site = new MockSite
            {
                ServiceType = result
            };
            var component = new SubComponent
            {
                Site = site
            };

            Assert.Same(result, component.GetService(serviceType));
        }
Пример #2
0
        public void GetService_InvokeWithoutSite_ReturnsNull(Type serviceType)
        {
            var component = new SubComponent();

            Assert.Null(component.GetService(serviceType));
        }