static void Main(string[] args) { int[] requests = new int[1000]; Algorithms Handler = new Algorithms(); Handler.GenerateRequests(ref requests); Console.WriteLine("Algo \tSeek Distance\n"); Console.WriteLine("FCFS \t" + Handler.FCFS(requests).ToString()); Console.WriteLine("SSTF \t" + Handler.SSTF(requests).ToString()); Console.WriteLine("SCAN \t" + Handler.SCAN(requests).ToString()); Console.WriteLine("CSCAN\t" + Handler.CSCAN(requests).ToString()); Console.WriteLine("LOOK \t" + Handler.LOOK(requests).ToString()); Console.WriteLine("CLOOK\t" + Handler.CLOOK(requests).ToString()); }
public void TesterTwo() { Algorithms Tester = new Algorithms(); int[] SmallTest = { 1, 2, 3, 4, 5 }; int result = Tester.FCFS(SmallTest, 5); int compare = 5; Assert.AreEqual(compare, result, "Correct Output"); }
public void TesterOne() { Algorithms Tester = new Algorithms(); int[] SmallTest = { 10, 5, 0, 5, 10 }; int result = Tester.FCFS(SmallTest, 5); int compare = 30; Assert.AreEqual(compare, result, "Correct Output"); }
public void TesterAllSameNumber() { Algorithms Tester = new Algorithms(); int[] SmallTest = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; int result = Tester.FCFS(SmallTest, 14); int compare = 1; Assert.AreEqual(compare, result, "Correct Output"); }