diff --git a/test/EventHub.Domain.Tests/Events/EventManagerTests.cs b/test/EventHub.Domain.Tests/Events/EventManagerTests.cs index 3d43cfa..14c5112 100644 --- a/test/EventHub.Domain.Tests/Events/EventManagerTests.cs +++ b/test/EventHub.Domain.Tests/Events/EventManagerTests.cs @@ -62,5 +62,25 @@ namespace EventHub.Events @event.Capacity.ShouldBe(newCapacity); }); } + + [Fact] + public async Task Should_Be_CountryId_And_City_Null_If_Event_Online() + { + var @event = new Event( + Guid.NewGuid(), + Guid.NewGuid(), + "1a8j3v0d", + "Introduction to the ABP Framework", + DateTime.Now, + DateTime.Now.AddDays(2), + "In this event, we will introduce the ABP Framework and explore the fundamental features."); + + await _eventManager.SetLocationAsync(@event, true, "http://abp.io", Guid.NewGuid(), "Istanbul"); + + @event.IsOnline.ShouldBeTrue(); + @event.OnlineLink.ShouldBe("http://abp.io"); + @event.CountryId.ShouldBeNull(); + @event.City.ShouldBeNull(); + } } } diff --git a/test/EventHub.Domain.Tests/Events/EventTests.cs b/test/EventHub.Domain.Tests/Events/EventTests.cs index 9f1ade2..18a23a4 100644 --- a/test/EventHub.Domain.Tests/Events/EventTests.cs +++ b/test/EventHub.Domain.Tests/Events/EventTests.cs @@ -25,25 +25,5 @@ namespace EventHub.Events exception.Code.ShouldBe(EventHubErrorCodes.EventEndTimeCantBeEarlierThanStartTime); } - - [Fact] - public void Should_Be_CountryId_And_City_Null_If_Event_Online() - { - var @event = new Event( - Guid.NewGuid(), - Guid.NewGuid(), - "1a8j3v0d", - "Introduction to the ABP Framework", - DateTime.Now, - DateTime.Now.AddDays(2), - "In this event, we will introduce the ABP Framework and explore the fundamental features."); - - @event.SetLocation(true, "http://abp.io", Guid.NewGuid(), "Istanbul"); - - @event.IsOnline.ShouldBeTrue(); - @event.OnlineLink.ShouldBe("http://abp.io"); - @event.CountryId.ShouldBeNull(); - @event.City.ShouldBeNull(); - } } }