public static DeclareSendMessageRequest CreateDeclareSendMessageRequest(Declaration declaration) { return(new DeclareSendMessageRequest { Declaration = DomainStubFactory.CreateDeclaration(declaration.RetrivedBadge) }); }
public override void Given() { base.Given(); this.Declaration = DomainStubFactory.CreateDeclaration(new Badge { Nbr = "1265-1265-1265" }); ExpectedResult = DomainStubFactory.CreateDeclareSendMessageRequest(this.Declaration); }
public void CanAddMobileToOwner() { var owner = DomainStubFactory.CreateOwner(); owner.Mobiles.Add(2, "0495678990"); //Act _session.Save( owner ); //Assert var result = Queries.RetrieveOwner(this._session, DomainStubFactory.CreateOwner()).First(); Assert.AreEqual(3, result.Mobiles.Count); }
public void CanCreateOwner() { //Act _session.Save( DomainStubFactory.CreateOwner() ); //Assert var memOwner = DomainStubFactory.CreateOwner(); IQueryable <Owner> expected = Queries.RetrieveOwner(this._session, memOwner); var ow = expected.First(); Assert.AreEqual(ow.EmailAddresses.First(), memOwner.EmailAddresses.First()); }
public void CanEditOwnerMobile() { string newMobile = "04939292929"; var owner = DomainStubFactory.CreateOwner(); owner.Mobiles[0] = newMobile; //Act _session.Save( owner ); //Assert var result = Queries.RetrieveOwner(this._session, DomainStubFactory.CreateOwner()).First(); Assert.AreEqual(newMobile, result.Mobiles[0]); }
public void CanDeleteOwner() { //Arrange var owner = DomainStubFactory.CreateOwner(); _session.Save(owner); //Act _session.Delete(owner); var memOwner = DomainStubFactory.CreateOwner(); IQueryable <Owner> expected = Queries.RetrieveOwner(this._session, memOwner); var ow = expected.FirstOrDefault(); Assert.IsNull(ow); }
public void CanAddBadgeToOwner() { //Act var owner = DomainStubFactory.CreateOwner(); owner.AddBadge(new Badge() { Nbr = "GHJ-IOP-123" }); _session.Save( owner ); //Assert var result = Queries.RetrieveOwner(this._session, owner); Assert.AreEqual(3, result.First().Badges.Count()); Assert.AreEqual("GHJIOP123", new List <Badge>(result.First().Badges)[2].Nbr); }
public override void When() { base.When(); Owner = DomainStubFactory.CreateOwner(); Owner = MapperService.MapToOwner(Owner, Request); }