예제 #1
0
        public void GetServiceType_Null()
        {
            // Action
            MockWrapperFactory.Instance.ServiceManagementServer
            .Setup(i => i.GetServiceType(
                       It.IsAny <Guid>()))
            .Returns(string.Empty);

            // Action
            var serviceType = SmartObjectHelper.GetServiceType(Guid.NewGuid());

            // Assert
            Assert.IsNull(serviceType);
        }
예제 #2
0
        public void GetServiceType_DefaultValues()
        {
            // Arrange
            MockWrapperFactory.Instance.ServiceManagementServer
            .Setup(i => i.GetServiceType(
                       It.IsAny <Guid>()))
            .Returns(Resources.ServiceType_ADService);

            // Action
            var serviceType = SmartObjectHelper.GetServiceType(Guid.NewGuid());

            // Assert
            Assert.IsNotNull(serviceType);
        }