public void All_TryCatchWithUndefinedType() { ReferencesInspector.For(typeof(TryCatchWithUndefinedType)).All() .Should().Have.SameValuesAs( common ); }
public void All_EmptyClass() { ReferencesInspector.For(typeof(EmptyClass)).All() .Should().Have.SameValuesAs( common ); }
public void All_SingleArgCtor() { ReferencesInspector.For(typeof(SingleArgCtor)).All() .Should().Have.SameValuesAs( common.Union(new[] { typeof(Fee) }) ); }
public void All_FeeMethod() { ReferencesInspector.For(typeof(FeeMethod)).All() .Should().Have.SameValuesAs( common.Union(new[] { typeof(Fee) }) ); }
public void All_SingleNonAutoProperty() { ReferencesInspector.For(typeof(SingleNonAutoProperty)).All() .Should().Have.SameValuesAs( common.Union(new[] { typeof(DateTime) }) ); }
public void All_TryCatchCustomException() { ReferencesInspector.For(typeof(TryCatchCustomException)).All() .Should().Have.SameValuesAs( common.Union(new[] { typeof(MyException) }) ); }
public void All_TryCatch() { ReferencesInspector.For(typeof(TryCatch)).All() .Should().Have.SameValuesAs( common.Union(new[] { typeof(DivideByZeroException) }) ); }
public void All_ExceptionRaiser() { ReferencesInspector.For(typeof(ExceptionRaiser)).All() .Should().Have.SameValuesAs( common.Union(new[] { typeof(Exception) }) ); }
public void All_SingleProperty() { ReferencesInspector.For(typeof(SingleProperty)).All() .Should().Have.SameValuesAs( common.Union(new[] { typeof(DateTime), typeof(System.Runtime.CompilerServices.CompilerGeneratedAttribute) }) ); }
public void FromStaticMethodCalls_StaticPropertyAndMethodCall() { ReferencesInspector.For <StaticPropertyAndMethodCall>() .FromStaticMethodCalls() .FilterBy(typeof(object).Not()) .Should().Have.SameValuesAs( new[] { typeof(Console), typeof(DateTime) } ); }
public void All_Attributes() { ReferencesInspector.For(typeof(Attributes)).All() .Should().Have.SameValuesAs( common.Union(new [] { typeof(SerializableAttribute), // Class Attribute typeof(NonSerializedAttribute), // Field Attribute typeof(FooAttribute), // MethodAttribute typeof(FooAttribute2) // Parameter Attribute }) ); }
public void FromNewobjInstructions_VoidMethodUsingFee() { ReferencesInspector.For(typeof(Samples.VoidMethodUsingFee)).FromNewobjInstructions() .Should().Contain(typeof(Samples.Fee)); }
public void All_VoidMethodUsingFee() { ReferencesInspector.For(typeof(Samples.VoidMethodUsingFee)).All() .Should().Contain(typeof(Samples.Fee)); }