PageRenderTime 48ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/Framework/src/Ncqrs.Tests/Eventing/Storage/SimpleEventTypeResolverTests.cs

http://github.com/ncqrs/ncqrs
C# | 28 lines | 24 code | 4 blank | 0 comment | 0 complexity | 40c76efec6090a795e964f3b2bc40b65 MD5 | raw file
Possible License(s): MPL-2.0-no-copyleft-exception, Apache-2.0
  1. using FluentAssertions;
  2. using Ncqrs.Eventing.Storage;
  3. using Xunit;
  4. namespace Ncqrs.Tests.Eventing.Storage
  5. {
  6. public class SimpleEventTypeResolverTests
  7. {
  8. private SimpleEventTypeResolver resolver = new SimpleEventTypeResolver();
  9. [Fact]
  10. public void Resolves_types_to_event_names()
  11. {
  12. var type = typeof(ILog);
  13. var result = resolver.EventNameFor(type);
  14. result.Should().Be(type.AssemblyQualifiedName);
  15. }
  16. [Fact]
  17. public void Resolves_event_names_to_types()
  18. {
  19. var type = typeof(ILog);
  20. var result = resolver.ResolveType(type.AssemblyQualifiedName);
  21. result.Should().Be(type);
  22. }
  23. }
  24. }