public void Setup() { GlobalReference.GlobalValues = new GlobalValues(); canDoSomething = new Objects.Global.CanMobDoSomething.CanMobDoSomething(); mob = new Mock <IMobileObject>(); inGameDateTime = new Mock <IInGameDateTime>(); room = new Mock <IRoom>(); item = new Mock <IItem>(); altMob = new Mock <IMobileObject>(); gameDateTime = new Mock <IGameDateTime>(); tagWrapper = new Mock <ITagWrapper>(); inGameDateTime.Setup(e => e.GameDateTime).Returns(gameDateTime.Object); room.Setup(e => e.Attributes).Returns(new HashSet <RoomAttribute>()); mob.Setup(e => e.Room).Returns(room.Object); item.Setup(e => e.Attributes).Returns(new List <ItemAttribute>() { ItemAttribute.Invisible }); altMob.Setup(e => e.AttributesCurrent).Returns(new List <MobileAttribute>() { MobileAttribute.Invisibile }); tagWrapper.Setup(e => e.WrapInTag(It.IsAny <string>(), TagType.Info)).Returns((string x, TagType y) => (x)); GlobalReference.GlobalValues.GameDateTime = inGameDateTime.Object; GlobalReference.GlobalValues.TagWrapper = tagWrapper.Object; }
public void Setup() { canDoSomething = new Objects.Global.CanMobDoSomething.CanMobDoSomething(); mob = new Mock <IMobileObject>(); dateTime = new Mock <IGameDateTime>(); room = new Mock <IRoom>(); item = new Mock <IItem>(); altMob = new Mock <IMobileObject>(); dateTime.Setup(e => e.InGameDateTime).Returns(new DateTime(01, 01, 01, 1, 00, 00)); GlobalReference.GlobalValues.GameDateTime = dateTime.Object; room.Setup(e => e.Attributes).Returns(new List <RoomAttribute>()); mob.Setup(e => e.Room).Returns(room.Object); item.Setup(e => e.Attributes).Returns(new List <ItemAttribute>() { ItemAttribute.Invisible }); altMob.Setup(e => e.AttributesCurrent).Returns(new List <MobileAttribute>() { MobileAttribute.Invisibile }); }