Skip to content

Commit

Permalink
added tests for variable isDynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
art-divin committed Dec 23, 2023
1 parent 6911534 commit 1bc5bfe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions SourceryTests/Models/VariableSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ class VariableSpec: QuickSpec {
expect(sut?.readAccess == AccessLevel.public.rawValue).to(beTrue())
}

it("has proper dynamic state") {
expect(Variable(name: "variable", typeName: TypeName(name: "Int"), accessLevel: (read: .public, write: .internal), isComputed: true, modifiers: [Modifier(name: "dynamic")]).isDynamic).to(beTrue())
expect(Variable(name: "variable", typeName: TypeName(name: "Int"), accessLevel: (read: .public, write: .internal), isComputed: true, modifiers: [Modifier(name: "lazy")]).isDynamic).to(beFalse())
}

it("has proper write access") {
expect(sut?.writeAccess == AccessLevel.internal.rawValue).to(beTrue())
}
Expand Down

0 comments on commit 1bc5bfe

Please sign in to comment.