PageRenderTime 42ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/Source/Examples/Example.Random/InternalTypeSpecs.cs

https://github.com/machine/machine.specifications
C# | 36 lines | 29 code | 7 blank | 0 comment | 0 complexity | 35bba1451c396ec1fd2f0328ff911b01 MD5 | raw file
Possible License(s): MIT, CC-BY-SA-3.0
  1. using FluentAssertions;
  2. using Machine.Specifications;
  3. namespace Example.Random.Internal
  4. {
  5. [Subject("Internal types")]
  6. [Tags(tag.example)]
  7. class when_a_context_is_internal
  8. {
  9. It should_work =
  10. () => true.Should().BeTrue();
  11. }
  12. [Subject("Internal types")]
  13. [Tags(tag.example)]
  14. class when_a_context_is_internal_and_uses_internal_behaviors
  15. {
  16. protected static bool MSpecRocks = true;
  17. Because of = () => { MSpecRocks = true; };
  18. Behaves_like<WorkingSpecs> a_working_spec;
  19. }
  20. [Behaviors]
  21. class WorkingSpecs
  22. {
  23. #pragma warning disable 0649
  24. protected static bool MSpecRocks;
  25. #pragma warning restore 0649
  26. It should_work =
  27. () => MSpecRocks.Should().BeTrue();
  28. }
  29. }