public void SaveRegTest() { var oMareRegHandler = new MareRegHandler(RegFake, MsgBoxFake); oMareRegHandler.SaveReg(); A.CallTo(() => RegFake.OpenSubKey("SYSTEM\\CurrentControlSet\\Control\\Class\\{4d36e968-e325-11ce-bfc1-08002be10318}")).MustHaveHappened(); }
public void UpdateTest() { var oMareRegHandler = new MareRegHandler(RegFake, MsgBoxFake); oMareRegHandler.AllGFX.Add(new GFX(0, 0, 0, 0, "FAKE_GPU")); oMareRegHandler.Update(0, "FAKE_GPU", 1, 1, 1); Assert.Collection(oMareRegHandler.AllGFX, x => new GFX(0, 1, 1, 1, "FAKE_GPU")); }
public void LoadRegTest() { var oMareRegHandler = new MareRegHandler(RegFake, MsgBoxFake); oMareRegHandler.LoadReg(); A.CallTo(() => RegFake.OpenSubKey("SYSTEM\\CurrentControlSet\\Control\\Class\\{4d36e968-e325-11ce-bfc1-08002be10318}")).MustHaveHappened(); A.CallTo(() => RegKeyFake.GetValue("KMD_EnableInternalLargePage", null)).MustHaveHappened(); A.CallTo(() => RegKeyFake.GetValue("EnableCrossFireAutoLink", null)).MustHaveHappened(); A.CallTo(() => RegKeyFake.GetValue("EnableUlps", null)).MustHaveHappened(); A.CallTo(() => RegKeyFake.GetValue("DriverDesc", null)).MustHaveHappened(); Assert.Collection(oMareRegHandler.AllGFX, x => new GFX(0, 0, 0, 0, "FAKE_GPU")); }
public void MareRegHandlerTest() { var oMareRegHandler = new MareRegHandler(RegFake, MsgBoxFake); Assert.Empty(oMareRegHandler.AllGFX); }