Example #1
0
        public void UPnP10DeviceValidator_ThrowIfInvalidThrowsOnValidationError()
        {
            var testDevice = new SsdpRootDevice()
            {
                FriendlyName = "Basic Device 1",
                Manufacturer = "Test Manufacturer",
                ManufacturerUrl = new Uri("http://testmanufacturer.com"),
                ModelDescription = "A test model device",
                ModelName = "Test Model",
                ModelNumber = "Model #1234",
                ModelUrl = new Uri("http://modelurl.com"),
                SerialNumber = "SN-123",
                Uuid = null,
                Location = new Uri("http://testdevice:1700/xml")
            };

            var validator = new Upnp10DeviceValidator();
            validator.ThrowIfDeviceInvalid(testDevice);
        }
Example #2
0
        public void UPnP10DeviceValidator_ThrowIfInvalidThrowsOnNullRootDevice()
        {
            SsdpRootDevice testDevice = null;

            var validator = new Upnp10DeviceValidator();
            validator.ThrowIfDeviceInvalid(testDevice);
        }