public void ToDbPromocodeNotNullTest() { var value = new Promocode { Id = Guid.Parse("dc666524-36a3-43ef-998c-7f250793d9bc"), CreateDate = "01.01.2020 10:10:10".GetUtcDateTime(), EndDate = "01.01.2021 10:10:10".GetUtcDateTime(), Deleted = false, PromocodeValue = StringExtentions.NewPromocodeValue() }.ToDbPromocode(); value.Should().NotBeNull(); }
public void PromocodeTest() { var promocode = new CrazyPrice.Common.Models.Promocode.Promocode { Id = Guid.Parse("dc666524-36a3-43ef-998c-7f250793d9bc"), CreateDate = "01.01.2020 10:10:10".GetUtcDateTime(), EndDate = "01.01.2021 10:10:10".GetUtcDateTime(), Deleted = false, PromocodeValue = StringExtentions.NewPromocodeValue() }; promocode.CreateDate.Should().NotBeNull(); promocode.EndDate.Should().NotBeNull(); promocode.PromocodeValue.Should().NotBeNull(); promocode.Id.Should().NotBeEmpty(); promocode.Expired.Should().BeTrue(); promocode.Deleted.Should().BeFalse(); }
public void UserPromocodesTest() { var userPromocodes = new UserPromocodes() { UserId = Guid.Parse("675f0949-fd50-4738-92e2-9523ecc031d1"), Promocodes = new List <CrazyPrice.Common.Models.Promocode.Promocode>() { new() { Id = Guid.Parse("dc666524-36a3-43ef-998c-7f250793d9bc"), CreateDate = DateTime.UtcNow, EndDate = DateTime.UtcNow, Deleted = false, PromocodeValue = StringExtentions.NewPromocodeValue() } } }; userPromocodes.UserId.Should().NotBeEmpty(); userPromocodes.Promocodes.Should().NotBeNull(); }
public void DbPromocodeTest() { var usersPromocodes = DbPromocode.New(new Guid(), DateTime.Now, 1, StringExtentions.NewPromocodeValue()); usersPromocodes.Should().NotBeNull(); }