Ejemplo n.º 1
0
        public void SutYieldInjectedClaims()
        {
            var expected = new[]
            {
                new Claim("foo", "bar"),
                new Claim("baz", "qux"),
                new Claim("quux", "corge")
            };

            var sut = new SimpleWebToken(expected);

            Assert.True(expected.SequenceEqual(sut));
            Assert.True(expected.Cast<object>().SequenceEqual(((IEnumerable)sut).OfType<object>()));
        }
Ejemplo n.º 2
0
 public void SutHasCorrectContents()
 {
     // Fixture setup
     var expectedBuilderTypes = new[]
     {   
         typeof(MultidimensionalArrayRelay),
         typeof(ArrayRelay),
         typeof(ParameterRequestRelay),
         typeof(PropertyRequestRelay),
         typeof(FieldRequestRelay),
         typeof(FiniteSequenceRelay),
         typeof(SeedIgnoringRelay),
         typeof(MethodInvoker)
     };
     // Exercise system
     var sut = new DefaultRelays();
     // Verify outcome
     Assert.True(expectedBuilderTypes.SequenceEqual(sut.Select(b => b.GetType())));
     // Teardown
 }