public void TestInitialize() { ea = new EventAccess(); ep = new EventProcessor(); eca = new EventCharacterAccess(); ecp = new EventCharacterProcessor(); string eventName = "Test Raid"; string eventType = "Raid"; string location = "266,070"; DateTime date = new DateTime(2020, 12, 10, 12, 0, 0); string description = "Doing a full raid. Be available for at least 2 hours"; int maxNumberOfCharacters = 25; string guildID = "99999999-9999-9999-9999-999999999999"; testEvent = new Event(guildID, eventName, description, eventType, location, date, maxNumberOfCharacters); string characterName = "Bob"; string race = "Demon"; string gender = "Both"; string profession = "Janitor"; int level = 95; string guild = "A guild"; int age = 900; string created = "Yes"; int deaths = 1; string title = "Title"; testCharacter = new Character(characterName, race, gender, profession, level, guild, age, created, deaths, title); ep.InsertEvent(testEvent.Name, testEvent.EventType, testEvent.Location, testEvent.Date, testEvent.Description, testEvent.MaxNumberOfCharacters, testEvent.GuildID); testEvent.EventID = ea.GetIdOfEvent(testEvent.Name); }
public bool Open(EventAccess dwDesiredAccess, bool bInheritHandle, string lpName) { m_Handle = NTKernel.OpenEvent((int)dwDesiredAccess, bInheritHandle, lpName); if (m_Handle == IntPtr.Zero) { return(false); } else { return(true); } }
public void TestInitialize() { ea = new EventAccess(); ep = new EventProcessor(); string name = "Test Raid"; string eventType = "Raid"; string location = "266,070"; DateTime date = new DateTime(2020, 12, 10, 12, 0, 0); string description = "Doing a full raid. Be available for at least 2 hours"; int maxNumberOfCharacters = 25; string guildID = "99999999-9999-9999-9999-999999999999"; testEvent = new Event(guildID, name, description, eventType, location, date, maxNumberOfCharacters); }
public void TestIfDeleteEventCallsDeleteEventInRepo() { // Arrange var repo = new Mock <IEventRepository>(); var manager = new EventAccess(repo.Object); // Act manager.DeleteEvent(It.IsAny <int>()); // Assert repo.Verify(x => x.DeleteEvent(It.IsAny <int>()), Times.Exactly(1)); }
public void TestIfUpdateEventCallsUpdateEventInRepo() { // Arrange var repo = new Mock <IEventRepository>(); var manager = new EventAccess(repo.Object); // Act manager.UpdateEvent(It.IsAny <Event>(), It.IsAny <IEnumerable <int> >()); // Assert repo.Verify(x => x.UpdateEvent(It.IsAny <Event>(), It.IsAny <IEnumerable <int> >()), Times.Exactly(1)); }
public void TestIfGetArchivedEventsCallsGetArchivedEventsInRepo() { // Arrange var repo = new Mock <IEventRepository>(); var manager = new EventAccess(repo.Object); // Act manager.GetArchivedEvents(); // Assert repo.Verify(x => x.GetArchivedEvents(), Times.Exactly(1)); }
public void TestIfAddEventCallsAddEventInRepo() { // Arrange var repo = new Mock <IEventRepository>(); var manager = new EventAccess(repo.Object); var intList = new List <int> { 0, 21, 31, 12, 59 }; // Act manager.AddEvent(It.IsAny <Event>(), intList); // Assert // AddEvent should be called x times equal to the amount of ints in the intList repo.Verify(x => x.AddEvent(It.IsAny <Event>(), It.IsAny <int>()), Times.Exactly(5)); }
internal static extern IntPtr CreateEventEx(IntPtr lpEventAttributes, IntPtr lpName, int dwFlags, EventAccess dwDesiredAccess);
internal static extern IntPtr CreateEventExW(IntPtr lpEventAttributes, IntPtr lpName, int dwFlags, EventAccess dwDesiredAccess);
internal static extern EventSafeHandle OpenEvent(EventAccess desiredAccess, bool inheritHandle, string lpName);
public EventLogic() { eventAccess = new EventAccess(); iAppLogManager = new AppLogManager(); }
public static extern NtStatus NtOpenEvent( [Out] out IntPtr EventHandle, [In] EventAccess DesiredAccess, [In] ref OBJECT_ATTRIBUTES ObjectAttributes);
public EventController(DatabaseInterface db) { _db = db; _Event = new EventAccess(db); }
public AppDataTest() { baseAccess = new BaseAccess(); eventAccess = new EventAccess(); }