public void Setup() { doorwayToUnderworld = new DoorwayToUnderworld(); room = new Mock <IRoom>(); effectParameter = new Mock <IEffectParameter>(); gameDateTime = new Mock <IGameDateTime>(); mockNpc = new Mock <INonPlayerCharacter>(); mockPc = new Mock <IPlayerCharacter>(); tagWrapper = new Mock <ITagWrapper>(); notify = new Mock <INotify>(); roomAttrbuties = new List <Objects.Room.Room.RoomAttribute>(); room.Setup(e => e.Attributes).Returns(roomAttrbuties); room.Setup(e => e.NonPlayerCharacters).Returns(new List <INonPlayerCharacter>() { mockNpc.Object }); room.Setup(e => e.PlayerCharacters).Returns(new List <IPlayerCharacter>() { mockPc.Object }); effectParameter.Setup(e => e.Target).Returns(room.Object); GlobalReference.GlobalValues.GameDateTime = gameDateTime.Object; GlobalReference.GlobalValues.TagWrapper = tagWrapper.Object; GlobalReference.GlobalValues.Notify = notify.Object; }
public void Setup() { GlobalReference.GlobalValues = new GlobalValues(); doorwayToUnderworld = new DoorwayToUnderworld(); room = new Mock <IRoom>(); effectParameter = new Mock <IEffectParameter>(); inGameDateTime = new Mock <IInGameDateTime>(); mockNpc = new Mock <INonPlayerCharacter>(); mockPc = new Mock <IPlayerCharacter>(); tagWrapper = new Mock <ITagWrapper>(); notify = new Mock <INotify>(); roomAttrbuties = new HashSet <RoomAttribute>(); gameDateTime = new Mock <IGameDateTime>(); room.Setup(e => e.Attributes).Returns(roomAttrbuties); room.Setup(e => e.NonPlayerCharacters).Returns(new List <INonPlayerCharacter>() { mockNpc.Object }); room.Setup(e => e.PlayerCharacters).Returns(new List <IPlayerCharacter>() { mockPc.Object }); effectParameter.Setup(e => e.Target).Returns(room.Object); inGameDateTime.Setup(e => e.GameDateTime).Returns(gameDateTime.Object); gameDateTime.Setup(e => e.Hour).Returns(12); gameDateTime.Setup(e => e.DayName).Returns(Objects.GameDateTime.Days.Death); 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; GlobalReference.GlobalValues.Notify = notify.Object; }