Esempio n. 1
0
 public void TemplateHasCorrectSymbols()
 {
     using (ApprovalResults.ForScenario(nameof(NativeTests)))
     {
         var text = Ildasm.Decompile(TestResult.AssemblyPath, "Costura.AssemblyLoader");
         Approvals.Verify(text);
     }
 }
Esempio n. 2
0
    public void Verify()
    {
        var verify = Ildasm.Decompile(GetAssemblyPath());

#if (NET46)
        ApprovalTests.Approvals.Verify(verify);
#endif
    }
Esempio n. 3
0
    public Task DecompileExample()
    {
        var decompile = Ildasm.Decompile(testResult.AssemblyPath, "AssemblyToProcess.Example");
        var settings  = new VerifySettings();

        settings.AutoVerify();
        return(Verifier.Verify(decompile, settings));
    }
Esempio n. 4
0
    public void Verify()
    {
        var verify = Ildasm.Decompile(GetAssemblyPath());

        using (ApprovalResults.UniqueForRuntime())
        {
            Approvals.Verify(verify);
        }
    }
Esempio n. 5
0
    public void VerifyMethod()
    {
        var verify = Ildasm.Decompile(GetAssemblyPath(), "DummyAssembly.Class1::Method");

        using (ApprovalResults.UniqueForRuntime())
        {
            Approvals.Verify(verify);
        }
    }
Esempio n. 6
0
    public void TemplateHasCorrectSymbols()
    {
        var dataPoints = GetScenarioName();

        using (ApprovalResults.ForScenario(dataPoints))
        {
            var text = Ildasm.Decompile(TestResult.AssemblyPath, "Costura.AssemblyLoader");
            Approvals.Verify(text);
        }
    }
Esempio n. 7
0
    public void TemplateHasCorrectSymbols()
    {
#if DEBUG
        var dataPoints = GetType().Name + "Debug";
#else
        var dataPoints = GetType().Name + "Release";
#endif
        using (ApprovalResults.ForScenario(dataPoints))
        {
            var text = Ildasm.Decompile(TestResult.AssemblyPath, "Costura.AssemblyLoader");
            Approvals.Verify(text, TrimLineEndings);
        }
    }
 public void AbstractImplementation_Decompiled()
 {
     Approvals.Verify(Ildasm.Decompile(_testResult.AssemblyPath, "LoggerIsEnabledScenariosAbstractImplementation"));
 }
 public void Enum_Decompiled()
 {
     Approvals.Verify(Ildasm.Decompile(_testResult.AssemblyPath, "LoggerIsEnabledEnum"));
 }
Esempio n. 10
0
 public Task GenericClassWithReferenceTypeConstraints()
 {
     return(Verify(Ildasm.Decompile(AssemblyWeaver.AfterAssemblyPath, "GenericClassWithReferenceTypeConstraints`1")));
 }
 public void Interface_Decompiled()
 {
     Approvals.Verify(Ildasm.Decompile(_testResult.AssemblyPath, "ILoggerIsEnabledScenarios"));
 }
 public void LogTrace_In_Switch_With_After_Code_Decompiled()
 {
     Approvals.Verify(Ildasm.Decompile(_testResult.AssemblyPath, "LoggerIsEnabledScenarios::LogTrace_In_Switch_With_After_Code"));
 }
 public void LogTrace_In_Exception_Catch_Decompiled()
 {
     Approvals.Verify(Ildasm.Decompile(_testResult.AssemblyPath, "LoggerIsEnabledScenarios::LogTrace_In_Exception_Catch"));
 }
Esempio n. 14
0
 public Task PublicNestedInsideNonPublic()
 {
     return(Verify(Ildasm.Decompile(AssemblyWeaver.AfterAssemblyPath, "NonPublicWithNested")));
 }
 public void LogTraceWithEnabled_With_Code_Before_And_After_Decompiled()
 {
     Approvals.Verify(Ildasm.Decompile(_testResult.AssemblyPath, "LoggerIsEnabledScenarios::LogTraceWithEnabled_With_Code_Before_And_After"));
 }
Esempio n. 16
0
 public Task SkipIXamlMetadataProvider()
 {
     return(Verify(Ildasm.Decompile(AssemblyWeaver.AfterAssemblyPath, "XamlMetadataProvider")));
 }
Esempio n. 17
0
 public Task SpecialClass_release()
 {
     return(Verify(Ildasm.Decompile(AssemblyWeaver.AfterAssemblyPath, "SpecialClass")));
 }
Esempio n. 18
0
 public Task SimpleClassNoAssert()
 {
     return(Verify(Ildasm.Decompile(AssemblyWeaver.AfterAssemblyPath, "SimpleClass")));
 }
Esempio n. 19
0
 public Task InterfaceBadAttributes()
 {
     return(Verify(Ildasm.Decompile(AssemblyWeaver.AfterAssemblyPath, "InterfaceBadAttributes")));
 }
Esempio n. 20
0
 public Task Indexers()
 {
     return(Verify(Ildasm.Decompile(AssemblyWeaver.AfterAssemblyPath, "Indexers")));
 }
 public void LogInformation_Decompiled()
 {
     Approvals.Verify(Ildasm.Decompile(_testResult.AssemblyPath, "LoggerIsEnabledScenarios::LogInformation"));
 }
Esempio n. 22
0
 public Task ClassWithPrivateMethodNoAssert()
 {
     return(Verify(Ildasm.Decompile(AssemblyWeaver.AfterAssemblyPath, "ClassWithPrivateMethod")));
 }
 public void LogCritical_Decompiled()
 {
     Approvals.Verify(Ildasm.Decompile(_testResult.AssemblyPath, "LoggerIsEnabledScenarios::LogCritical"));
 }
Esempio n. 24
0
 public void ClassWithBrokenReplacement()
 {
     Approvals.Verify(Ildasm.Decompile(testResult.AssemblyPath, "ClassWithBrokenReplacement"));
 }
 public void LogTrace_Multiple_With_Second_IsEnabled_Decompiled()
 {
     Approvals.Verify(Ildasm.Decompile(_testResult.AssemblyPath, "LoggerIsEnabledScenarios::LogTrace_Multiple_With_Second_IsEnabled"));
 }
Esempio n. 26
0
 public void ClassWithDateTime()
 {
     Approvals.Verify(Ildasm.Decompile(testResult.AssemblyPath, "ClassWithDateTime"));
 }
 public void LogTrace_In_Exception_With_Before_And_After_Code_In_Try_Decompiled()
 {
     Approvals.Verify(Ildasm.Decompile(_testResult.AssemblyPath, "LoggerIsEnabledScenarios::LogTrace_In_Exception_With_Before_And_After_Code_In_Try"));
 }
Esempio n. 28
0
 public void ClassWithGenericUsage()
 {
     Approvals.Verify(Ildasm.Decompile(testResult.AssemblyPath, "ClassWithGenericUsage"));
 }
Esempio n. 29
0
 public Task UnsafeClass()
 {
     return(Verify(Ildasm.Decompile(AssemblyWeaver.AfterAssemblyPath, "UnsafeClass")));
 }
Esempio n. 30
0
 public Task GenericClass()
 {
     return(Verify(Ildasm.Decompile(AssemblyWeaver.AfterAssemblyPath, "GenericClass`1")));
 }