예제 #1
0
        public void ExtractClaimsBytes_Returns_Right_Amount_Of_Guids(int numclaims)
        {
            var guids = DataGeneration.GenerateByteArrayClaims(numclaims);

            var expected = numclaims;
            var actual   = ClaimParsing.ExtractClaims(guids).Count();

            Assert.Equal(expected, actual);
        }
예제 #2
0
        public void GenerateByteArrayClaims_Generates_Right_Amount_Of_Guids(int numclaims)
        {
            var guids = DataGeneration.GenerateByteArrayClaims(numclaims);

            // lets just do it he microsoft way
            // https://github.com/dotnet/corefx/blob/master/src/Common/src/CoreLib/System/Guid.cs#L50
            var actual   = guids.Length;
            var expected = numclaims * 16;

            Assert.NotNull(guids);
            Assert.Equal(expected, actual);
        }
예제 #3
0
파일: Program.cs 프로젝트: fredeil/INF-2202
 public void Setup()
 {
     Data     = DataGeneration.GenerateStringClaims(NumClaims);
     byteData = DataGeneration.GenerateByteArrayClaims(NumClaims);
 }
예제 #4
0
 public void GenerateByteArrayClaims_Generates_Throws_Right_Exception()
 {
     Assert.Throws <ArgumentNullException>(()
                                           => DataGeneration.GenerateByteArrayClaims(0));
 }