示例#1
0
        public void Ce_ForSingleArgCtorIgnoringOtherAssembliesTypes()
        {
            var ce = Ce.For <Samples.SingleArgCtor>()
                     .Ignoring(typeof(Samples.SingleArgCtor).Assembly.Not());

            ce.Value.Should().Be(1);
            ce.References.Should().Have.SameValuesAs(
                new[] { typeof(Samples.Fee) }
                );
        }
示例#2
0
        public void Ce_ForSingleArgCtorIgnoringCommonTypes()
        {
            var ce = Ce.For <Samples.SingleArgCtor>()
                     .Ignoring <System.Runtime.TargetedPatchingOptOutAttribute>()
                     .Ignoring <System.Security.SecuritySafeCriticalAttribute>()
                     .Ignoring <System.Runtime.ConstrainedExecution.ReliabilityContractAttribute>()
                     .Ignoring <System.Runtime.CompilerServices.CompilerGeneratedAttribute>()
                     .Ignoring <System.Object>()
                     .Ignoring <System.Int32>()
                     .Ignoring <System.String>()
                     .Ignoring <System.Boolean>()
                     .Ignoring <System.Type>();

            ce.Value.Should().Be(1);
            ce.References.Should().Have.SameValuesAs(
                new[] { typeof(Samples.Fee) }
                );
        }
示例#3
0
        public void Ce_ForSingleArgCtorIgnoringTypeSet()
        {
            var ce = Ce.For <Samples.SingleArgCtor>()
                     .Ignoring(TypeSet.With(
                                   typeof(System.Runtime.TargetedPatchingOptOutAttribute),
                                   typeof(System.Security.SecuritySafeCriticalAttribute),
                                   typeof(System.Runtime.ConstrainedExecution.ReliabilityContractAttribute),
                                   typeof(System.Runtime.CompilerServices.CompilerGeneratedAttribute),
                                   typeof(object),
                                   typeof(int),
                                   typeof(string),
                                   typeof(bool),
                                   typeof(Type)
                                   ));

            ce.Value.Should().Be(1);
            ce.References.Should().Have.SameValuesAs(
                new[] { typeof(Samples.Fee) }
                );
        }
示例#4
0
 public void DadoQueDesejoObterOAcoplamentoEferenteDeTodosOsTiposDesseAssembly()
 {
     resultingMetric = Ce.For(GetType().Assembly);
 }
示例#5
0
 public void QuandoDesejoObterSeuAcoplamentoEferente()
 {
     resultingMetric = Ce.For(workingType);
 }