Skip to content
Snippets Groups Projects
Select Git revision
  • 2346a778ddcc78440c1defde13eb4b96586b604a
  • main default protected
  • dev protected
  • hotfixes-oct-2022
  • refactor/avatar-cell
  • 1.1.5
  • 1.1.4
  • 1.1.3
  • 1.1
  • 1.0.8
  • 1.0.7
  • 1.0.6
12 results

DependencyPropertyWrapperTests.swift

Blame
  • user avatar
    Bruno Muniz authored
    48ac2853
    History
    DependencyPropertyWrapperTests.swift 612 B
    import XCTest
    @testable import DependencyInjection
    
    final class DependencyPropertyWrapperTests: XCTestCase {
        func testPropertyGetter() {
            struct Context {
                static let container = Container()
                @Dependency(container: container) var property: TestDependencyProtocol
            }
            
            let dependency = TestDependency()
            Context.container.register(dependency as TestDependencyProtocol)
            
            XCTAssert(Context().property === dependency)
        }
    }
    
    private protocol TestDependencyProtocol: AnyObject {}
    
    private class TestDependency: TestDependencyProtocol {}