Beispiel #1
0
        public void FiftyOneClientCapabilityProvider_GetClientCapabilityById_Returns_ClientCapability_For_ClientId()
        {
            //Arrange
            var clientCapability = _clientCapabilityProvider.GetClientCapability(iphoneUserAgent);
            var actual           = clientCapability.Capabilities;

            //Act
            var clientCapabilitiesById = _clientCapabilityProvider.GetClientCapabilityById(clientCapability.ID);
            var expected = clientCapabilitiesById.Capabilities;

            //Assert
            Assert.AreEqual(clientCapability.ID, clientCapabilitiesById.ID);
            Assert.IsTrue(actual.OrderBy(kvp => kvp.Key).SequenceEqual(expected.OrderBy(kvp => kvp.Key)));
            Assert.IsTrue(actual.OrderBy(kvp => kvp.Value).SequenceEqual(expected.OrderBy(kvp => kvp.Value)));
        }
 public void FiftyOneClientCapabilityProvider_GetClientCapabilityById_ThrowsException_For_Empty_ClientCapabilityId()
 {
     //Act
     string nullClientCapabilityId     = String.Empty;
     var    clientCapabilitiesByNullId = _clientCapabilityProvider.GetClientCapabilityById(nullClientCapabilityId);
 }