Restore SEBPatch
This commit is contained in:
158
SafeExamBrowser.Lockdown.UnitTests/AutoRestoreMechanismTests.cs
Normal file
158
SafeExamBrowser.Lockdown.UnitTests/AutoRestoreMechanismTests.cs
Normal file
@@ -0,0 +1,158 @@
|
||||
/*
|
||||
* Copyright (c) 2024 ETH Zürich, IT Services
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Moq;
|
||||
using SafeExamBrowser.Lockdown.Contracts;
|
||||
using SafeExamBrowser.Logging.Contracts;
|
||||
|
||||
namespace SafeExamBrowser.Lockdown.UnitTests
|
||||
{
|
||||
[TestClass]
|
||||
public class AutoRestoreMechanismTests
|
||||
{
|
||||
private Mock<IFeatureConfigurationBackup> backup;
|
||||
private Mock<ILogger> logger;
|
||||
private Mock<ISystemConfigurationUpdate> systemConfigurationUpdate;
|
||||
private AutoRestoreMechanism sut;
|
||||
|
||||
[TestInitialize]
|
||||
public void Initialize()
|
||||
{
|
||||
backup = new Mock<IFeatureConfigurationBackup>();
|
||||
logger = new Mock<ILogger>();
|
||||
systemConfigurationUpdate = new Mock<ISystemConfigurationUpdate>();
|
||||
|
||||
sut = new AutoRestoreMechanism(backup.Object, logger.Object, systemConfigurationUpdate.Object, 0);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void MustExecuteAsynchronously()
|
||||
{
|
||||
var sync = new AutoResetEvent(false);
|
||||
var threadId = Thread.CurrentThread.ManagedThreadId;
|
||||
|
||||
backup.Setup(b => b.GetAllConfigurations()).Callback(() => { threadId = Thread.CurrentThread.ManagedThreadId; sync.Set(); });
|
||||
|
||||
sut.Start();
|
||||
sync.WaitOne();
|
||||
sut.Stop();
|
||||
|
||||
Assert.AreNotEqual(Thread.CurrentThread.ManagedThreadId, threadId);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void MustNotStartMultipleTimes()
|
||||
{
|
||||
var counter = 0;
|
||||
var list = new List<IFeatureConfiguration>();
|
||||
var sync = new AutoResetEvent(false);
|
||||
|
||||
backup.Setup(b => b.GetAllConfigurations()).Returns(() => { counter++; Thread.Sleep(50); sync.Set(); return list; });
|
||||
|
||||
sut.Start();
|
||||
sut.Start();
|
||||
sut.Start();
|
||||
sut.Start();
|
||||
sut.Start();
|
||||
sut.Start();
|
||||
sut.Start();
|
||||
sync.WaitOne();
|
||||
sut.Stop();
|
||||
|
||||
Assert.AreEqual(1, counter);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void MustNotTerminateUntilAllChangesReverted()
|
||||
{
|
||||
var configuration = new Mock<IFeatureConfiguration>();
|
||||
var counter = 0;
|
||||
var limit = new Random().Next(5, 50);
|
||||
var list = new List<IFeatureConfiguration> { configuration.Object };
|
||||
var sync = new AutoResetEvent(false);
|
||||
|
||||
backup.Setup(b => b.GetAllConfigurations()).Returns(() => new List<IFeatureConfiguration>(list)).Callback(() => counter++);
|
||||
backup.Setup(b => b.Delete(It.IsAny<IFeatureConfiguration>())).Callback(() => list.Clear());
|
||||
configuration.Setup(c => c.Restore()).Returns(() => counter >= limit);
|
||||
systemConfigurationUpdate.Setup(u => u.ExecuteAsync()).Callback(() => sync.Set());
|
||||
|
||||
sut.Start();
|
||||
sync.WaitOne();
|
||||
sut.Stop();
|
||||
|
||||
backup.Verify(b => b.GetAllConfigurations(), Times.Exactly(limit));
|
||||
backup.Verify(b => b.Delete(It.Is<IFeatureConfiguration>(c => c == configuration.Object)), Times.Once);
|
||||
configuration.Verify(c => c.Restore(), Times.Exactly(limit));
|
||||
systemConfigurationUpdate.Verify(u => u.Execute(), Times.Never);
|
||||
systemConfigurationUpdate.Verify(u => u.ExecuteAsync(), Times.Once);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void MustRespectTimeout()
|
||||
{
|
||||
const int TIMEOUT = 50;
|
||||
|
||||
var after = default(DateTime);
|
||||
var before = default(DateTime);
|
||||
var configuration = new Mock<IFeatureConfiguration>();
|
||||
var counter = 0;
|
||||
var list = new List<IFeatureConfiguration> { configuration.Object };
|
||||
var sync = new AutoResetEvent(false);
|
||||
|
||||
sut = new AutoRestoreMechanism(backup.Object, logger.Object, systemConfigurationUpdate.Object, TIMEOUT);
|
||||
|
||||
backup.Setup(b => b.GetAllConfigurations()).Returns(list).Callback(() =>
|
||||
{
|
||||
switch (++counter)
|
||||
{
|
||||
case 1:
|
||||
before = DateTime.Now;
|
||||
break;
|
||||
case 2:
|
||||
after = DateTime.Now;
|
||||
list.Clear();
|
||||
sync.Set();
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
sut.Start();
|
||||
sync.WaitOne();
|
||||
sut.Stop();
|
||||
|
||||
Assert.IsTrue(after - before >= new TimeSpan(0, 0, 0, 0, TIMEOUT));
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void MustStop()
|
||||
{
|
||||
var configuration = new Mock<IFeatureConfiguration>();
|
||||
var counter = 0;
|
||||
var list = new List<IFeatureConfiguration> { configuration.Object };
|
||||
|
||||
backup.Setup(b => b.GetAllConfigurations()).Returns(list).Callback(() => counter++);
|
||||
|
||||
sut.Start();
|
||||
Thread.Sleep(25);
|
||||
sut.Stop();
|
||||
|
||||
backup.Verify(b => b.GetAllConfigurations(), Times.Between(counter, counter + 1, Range.Inclusive));
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[ExpectedException(typeof(ArgumentException))]
|
||||
public void MustValidateTimeout()
|
||||
{
|
||||
new AutoRestoreMechanism(backup.Object, logger.Object, systemConfigurationUpdate.Object, new Random().Next(int.MinValue, -1));
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,198 @@
|
||||
/*
|
||||
* Copyright (c) 2024 ETH Zürich, IT Services
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Moq;
|
||||
using SafeExamBrowser.Lockdown.Contracts;
|
||||
using SafeExamBrowser.Logging.Contracts;
|
||||
|
||||
namespace SafeExamBrowser.Lockdown.UnitTests
|
||||
{
|
||||
[TestClass]
|
||||
public class FeatureConfigurationBackupTests
|
||||
{
|
||||
private string filePath;
|
||||
private Mock<IModuleLogger> logger;
|
||||
private FeatureConfigurationBackup sut;
|
||||
|
||||
[TestInitialize]
|
||||
public void Initialize()
|
||||
{
|
||||
filePath = $@"{Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)}\Backup-{Guid.NewGuid()}.bin";
|
||||
logger = new Mock<IModuleLogger>();
|
||||
|
||||
sut = new FeatureConfigurationBackup(filePath, logger.Object);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void Delete_MustOnlyRemoveGivenData()
|
||||
{
|
||||
var configuration1 = new FeatureConfigurationStub();
|
||||
var configuration2 = new FeatureConfigurationStub();
|
||||
var configuration3 = new FeatureConfigurationStub();
|
||||
var toDelete = new FeatureConfigurationStub();
|
||||
|
||||
sut.Save(configuration1);
|
||||
sut.Save(configuration2);
|
||||
sut.Save(toDelete);
|
||||
sut.Save(configuration3);
|
||||
sut.Delete(toDelete);
|
||||
|
||||
var configurations = sut.GetAllConfigurations();
|
||||
|
||||
Assert.AreEqual(3, configurations.Count);
|
||||
Assert.IsFalse(configurations.Any(c => c.Id == toDelete.Id));
|
||||
Assert.IsTrue(configurations.Any(c => c.Id == configuration1.Id));
|
||||
Assert.IsTrue(configurations.Any(c => c.Id == configuration2.Id));
|
||||
Assert.IsTrue(configurations.Any(c => c.Id == configuration3.Id));
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void Delete_MustDeleteFileIfEmpty()
|
||||
{
|
||||
var configuration = new FeatureConfigurationStub();
|
||||
|
||||
sut.Save(configuration);
|
||||
Assert.IsTrue(File.Exists(filePath));
|
||||
|
||||
sut.Delete(configuration);
|
||||
Assert.IsFalse(File.Exists(filePath));
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void Delete_MustNotFailIfDataNotInBackup()
|
||||
{
|
||||
var configuration = new FeatureConfigurationStub();
|
||||
|
||||
sut.Delete(configuration);
|
||||
|
||||
sut.Save(new FeatureConfigurationStub());
|
||||
sut.Save(new FeatureConfigurationStub());
|
||||
sut.Save(new FeatureConfigurationStub());
|
||||
|
||||
sut.Delete(configuration);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void GetAll_MustReturnAllConfigurationData()
|
||||
{
|
||||
var configuration1 = new FeatureConfigurationStub { GroupId = Guid.NewGuid() };
|
||||
var configuration2 = new FeatureConfigurationStub { GroupId = Guid.Empty };
|
||||
var configuration3 = new FeatureConfigurationStub { GroupId = Guid.Empty };
|
||||
var configuration4 = new FeatureConfigurationStub { GroupId = Guid.NewGuid() };
|
||||
|
||||
sut.Save(configuration1);
|
||||
sut.Save(configuration2);
|
||||
sut.Save(configuration3);
|
||||
sut.Save(configuration4);
|
||||
|
||||
var configurations = sut.GetAllConfigurations();
|
||||
|
||||
Assert.AreEqual(4, configurations.Count);
|
||||
Assert.AreEqual(configurations[0].GroupId, configuration1.GroupId);
|
||||
Assert.AreEqual(configurations[1].GroupId, configuration2.GroupId);
|
||||
Assert.AreEqual(configurations[2].GroupId, configuration3.GroupId);
|
||||
Assert.AreEqual(configurations[3].GroupId, configuration4.GroupId);
|
||||
Assert.IsTrue(configurations.Any(c => c.Id == configuration1.Id));
|
||||
Assert.IsTrue(configurations.Any(c => c.Id == configuration2.Id));
|
||||
Assert.IsTrue(configurations.Any(c => c.Id == configuration3.Id));
|
||||
Assert.IsTrue(configurations.Any(c => c.Id == configuration4.Id));
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void GetAll_MustReturnEmptyListIfNoDataAvailable()
|
||||
{
|
||||
var configurations = sut.GetAllConfigurations();
|
||||
|
||||
Assert.IsInstanceOfType(configurations, typeof(IList<IFeatureConfiguration>));
|
||||
Assert.AreEqual(0, configurations.Count);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void GetBy_MustOnlyReturnConfigurationDataBelongingToGroup()
|
||||
{
|
||||
var groupId = Guid.NewGuid();
|
||||
var configuration1 = new FeatureConfigurationStub { GroupId = groupId };
|
||||
var configuration2 = new FeatureConfigurationStub { GroupId = Guid.NewGuid() };
|
||||
var configuration3 = new FeatureConfigurationStub { GroupId = groupId };
|
||||
var configuration4 = new FeatureConfigurationStub { GroupId = Guid.NewGuid() };
|
||||
|
||||
sut.Save(configuration1);
|
||||
sut.Save(configuration2);
|
||||
sut.Save(configuration3);
|
||||
sut.Save(configuration4);
|
||||
|
||||
var configurations = sut.GetBy(groupId);
|
||||
|
||||
Assert.AreEqual(2, configurations.Count);
|
||||
Assert.AreEqual(configurations[0].GroupId, groupId);
|
||||
Assert.AreEqual(configurations[1].GroupId, groupId);
|
||||
Assert.IsTrue(configurations.Any(c => c.Id == configuration1.Id));
|
||||
Assert.IsFalse(configurations.Any(c => c.Id == configuration2.Id));
|
||||
Assert.IsTrue(configurations.Any(c => c.Id == configuration3.Id));
|
||||
Assert.IsFalse(configurations.Any(c => c.Id == configuration4.Id));
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void GetBy_MustReturnEmptyListIfNoDataAvailable()
|
||||
{
|
||||
var configurations = sut.GetBy(Guid.NewGuid());
|
||||
|
||||
Assert.IsInstanceOfType(configurations, typeof(IList<IFeatureConfiguration>));
|
||||
Assert.AreEqual(0, configurations.Count);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void Save_MustSaveGivenData()
|
||||
{
|
||||
var configuration = new FeatureConfigurationStub();
|
||||
|
||||
sut.Save(configuration);
|
||||
|
||||
Assert.IsTrue(File.Exists(filePath));
|
||||
|
||||
using (var stream = File.Open(filePath, FileMode.Open))
|
||||
{
|
||||
Assert.IsInstanceOfType(new BinaryFormatter().Deserialize(stream), typeof(IList<IFeatureConfiguration>));
|
||||
}
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void Save_MustNotOverwriteExistingData()
|
||||
{
|
||||
var configuration1 = new FeatureConfigurationStub();
|
||||
var configuration2 = new FeatureConfigurationStub();
|
||||
var configuration3 = new FeatureConfigurationStub();
|
||||
var configuration4 = new FeatureConfigurationStub();
|
||||
var configuration5 = new FeatureConfigurationStub();
|
||||
|
||||
sut.Save(configuration1);
|
||||
sut.Save(configuration2);
|
||||
sut.Save(configuration3);
|
||||
|
||||
Assert.AreEqual(3, sut.GetAllConfigurations().Count);
|
||||
|
||||
sut.Save(configuration4);
|
||||
sut.Save(configuration5);
|
||||
|
||||
Assert.AreEqual(5, sut.GetAllConfigurations().Count);
|
||||
}
|
||||
|
||||
[TestCleanup]
|
||||
public void Cleanup()
|
||||
{
|
||||
File.Delete(filePath);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,196 @@
|
||||
/*
|
||||
* Copyright (c) 2024 ETH Zürich, IT Services
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Threading;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Moq;
|
||||
using SafeExamBrowser.Lockdown.Contracts;
|
||||
using SafeExamBrowser.Logging.Contracts;
|
||||
|
||||
namespace SafeExamBrowser.Lockdown.UnitTests
|
||||
{
|
||||
[TestClass]
|
||||
public class FeatureConfigurationMonitorTests
|
||||
{
|
||||
private Mock<ILogger> logger;
|
||||
private FeatureConfigurationMonitor sut;
|
||||
|
||||
[TestInitialize]
|
||||
public void Initialize()
|
||||
{
|
||||
logger = new Mock<ILogger>();
|
||||
sut = new FeatureConfigurationMonitor(logger.Object, 0);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void MustEnforceConfigurations()
|
||||
{
|
||||
var configuration1 = new Mock<IFeatureConfiguration>();
|
||||
var configuration2 = new Mock<IFeatureConfiguration>();
|
||||
var configuration3 = new Mock<IFeatureConfiguration>();
|
||||
var counter = 0;
|
||||
var limit = new Random().Next(5, 50);
|
||||
var sync = new AutoResetEvent(false);
|
||||
|
||||
configuration1.Setup(c => c.GetStatus()).Returns(FeatureConfigurationStatus.Disabled);
|
||||
configuration2.Setup(c => c.GetStatus()).Returns(FeatureConfigurationStatus.Enabled);
|
||||
configuration3.Setup(c => c.GetStatus()).Returns(FeatureConfigurationStatus.Disabled).Callback(() =>
|
||||
{
|
||||
if (++counter >= limit)
|
||||
{
|
||||
sync.Set();
|
||||
}
|
||||
});
|
||||
|
||||
sut = new FeatureConfigurationMonitor(logger.Object, 2);
|
||||
|
||||
sut.Observe(configuration1.Object, FeatureConfigurationStatus.Enabled);
|
||||
sut.Observe(configuration2.Object, FeatureConfigurationStatus.Disabled);
|
||||
sut.Observe(configuration3.Object, FeatureConfigurationStatus.Undefined);
|
||||
sut.Start();
|
||||
sync.WaitOne();
|
||||
sut.Reset();
|
||||
|
||||
configuration1.Verify(c => c.EnableFeature(), Times.Exactly(limit));
|
||||
configuration2.Verify(c => c.DisableFeature(), Times.Exactly(limit));
|
||||
configuration3.Verify(c => c.DisableFeature(), Times.Never);
|
||||
configuration3.Verify(c => c.EnableFeature(), Times.Never);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void MustExecuteAsynchronously()
|
||||
{
|
||||
var configuration = new Mock<IFeatureConfiguration>();
|
||||
var sync = new AutoResetEvent(false);
|
||||
var threadId = Thread.CurrentThread.ManagedThreadId;
|
||||
|
||||
configuration.Setup(c => c.GetStatus()).Callback(() => { threadId = Thread.CurrentThread.ManagedThreadId; sync.Set(); });
|
||||
|
||||
sut.Observe(configuration.Object, FeatureConfigurationStatus.Disabled);
|
||||
sut.Start();
|
||||
sync.WaitOne();
|
||||
sut.Reset();
|
||||
|
||||
Assert.AreNotEqual(Thread.CurrentThread.ManagedThreadId, threadId);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void MustNotStartMultipleTimes()
|
||||
{
|
||||
var configuration = new Mock<IFeatureConfiguration>();
|
||||
var counter = 0;
|
||||
var sync = new AutoResetEvent(false);
|
||||
|
||||
configuration.Setup(c => c.GetStatus()).Returns(() =>
|
||||
{
|
||||
counter++;
|
||||
Thread.Sleep(50);
|
||||
sync.Set();
|
||||
sut.Reset();
|
||||
|
||||
return FeatureConfigurationStatus.Disabled;
|
||||
});
|
||||
|
||||
sut.Observe(configuration.Object, FeatureConfigurationStatus.Enabled);
|
||||
sut.Start();
|
||||
sut.Start();
|
||||
sut.Start();
|
||||
sut.Start();
|
||||
sut.Start();
|
||||
sut.Start();
|
||||
sut.Start();
|
||||
sync.WaitOne();
|
||||
sut.Reset();
|
||||
|
||||
Assert.AreEqual(1, counter);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void MustRespectTimeout()
|
||||
{
|
||||
const int TIMEOUT = 50;
|
||||
|
||||
var after = default(DateTime);
|
||||
var before = default(DateTime);
|
||||
var configuration = new Mock<IFeatureConfiguration>();
|
||||
var counter = 0;
|
||||
var sync = new AutoResetEvent(false);
|
||||
|
||||
sut = new FeatureConfigurationMonitor(logger.Object, TIMEOUT);
|
||||
|
||||
configuration.Setup(c => c.GetStatus()).Returns(FeatureConfigurationStatus.Undefined).Callback(() =>
|
||||
{
|
||||
switch (++counter)
|
||||
{
|
||||
case 1:
|
||||
before = DateTime.Now;
|
||||
break;
|
||||
case 2:
|
||||
after = DateTime.Now;
|
||||
sync.Set();
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
sut.Observe(configuration.Object, FeatureConfigurationStatus.Disabled);
|
||||
sut.Start();
|
||||
sync.WaitOne();
|
||||
sut.Reset();
|
||||
|
||||
Assert.IsTrue(after - before >= new TimeSpan(0, 0, 0, 0, TIMEOUT));
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void MustStopWhenReset()
|
||||
{
|
||||
var configuration = new Mock<IFeatureConfiguration>();
|
||||
var counter = 0;
|
||||
|
||||
configuration.Setup(c => c.GetStatus()).Returns(FeatureConfigurationStatus.Disabled).Callback(() => counter++);
|
||||
|
||||
sut.Observe(configuration.Object, FeatureConfigurationStatus.Enabled);
|
||||
sut.Start();
|
||||
Thread.Sleep(10);
|
||||
sut.Reset();
|
||||
Thread.Sleep(10);
|
||||
|
||||
configuration.Verify(c => c.GetStatus(), Times.Exactly(counter));
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void MustRemoveConfigurationsWhenReset()
|
||||
{
|
||||
var configuration = new Mock<IFeatureConfiguration>();
|
||||
var counter = 0;
|
||||
|
||||
configuration.Setup(c => c.GetStatus()).Returns(FeatureConfigurationStatus.Disabled).Callback(() => counter++);
|
||||
|
||||
sut.Observe(configuration.Object, FeatureConfigurationStatus.Enabled);
|
||||
sut.Start();
|
||||
Thread.Sleep(10);
|
||||
sut.Reset();
|
||||
|
||||
configuration.Verify(c => c.GetStatus(), Times.Exactly(counter));
|
||||
configuration.Reset();
|
||||
|
||||
sut.Start();
|
||||
Thread.Sleep(10);
|
||||
sut.Reset();
|
||||
|
||||
configuration.Verify(c => c.GetStatus(), Times.Never);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[ExpectedException(typeof(ArgumentException))]
|
||||
public void MustValidateTimeout()
|
||||
{
|
||||
new FeatureConfigurationMonitor(logger.Object, new Random().Next(int.MinValue, -1));
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright (c) 2024 ETH Zürich, IT Services
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using SafeExamBrowser.Lockdown.Contracts;
|
||||
|
||||
namespace SafeExamBrowser.Lockdown.UnitTests
|
||||
{
|
||||
[Serializable]
|
||||
internal class FeatureConfigurationStub : IFeatureConfiguration
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid GroupId { get; set; }
|
||||
|
||||
public FeatureConfigurationStub()
|
||||
{
|
||||
Id = Guid.NewGuid();
|
||||
}
|
||||
|
||||
public bool DisableFeature()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool EnableFeature()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public FeatureConfigurationStatus GetStatus()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool Reset()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool Restore()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[assembly: AssemblyTitle("SafeExamBrowser.Lockdown.UnitTests")]
|
||||
[assembly: AssemblyDescription("Safe Exam Browser")]
|
||||
[assembly: AssemblyCompany("ETH Zürich")]
|
||||
[assembly: AssemblyProduct("SafeExamBrowser.Lockdown.UnitTests")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2024 ETH Zürich, IT Services")]
|
||||
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
[assembly: Guid("90378e33-3898-4a7c-be2d-2f3efcfc4bb5")]
|
||||
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyInformationalVersion("1.0.0.0")]
|
@@ -0,0 +1,179 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\MSTest.TestAdapter.3.2.2\build\net462\MSTest.TestAdapter.props" Condition="Exists('..\packages\MSTest.TestAdapter.3.2.2\build\net462\MSTest.TestAdapter.props')" />
|
||||
<Import Project="..\packages\Microsoft.Testing.Extensions.Telemetry.1.0.2\build\netstandard2.0\Microsoft.Testing.Extensions.Telemetry.props" Condition="Exists('..\packages\Microsoft.Testing.Extensions.Telemetry.1.0.2\build\netstandard2.0\Microsoft.Testing.Extensions.Telemetry.props')" />
|
||||
<Import Project="..\packages\Microsoft.Testing.Platform.MSBuild.1.0.2\build\netstandard2.0\Microsoft.Testing.Platform.MSBuild.props" Condition="Exists('..\packages\Microsoft.Testing.Platform.MSBuild.1.0.2\build\netstandard2.0\Microsoft.Testing.Platform.MSBuild.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{90378E33-3898-4A7C-BE2D-2F3EFCFC4BB5}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>SafeExamBrowser.Lockdown.UnitTests</RootNamespace>
|
||||
<AssemblyName>SafeExamBrowser.Lockdown.UnitTests</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">15.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
|
||||
<IsCodedUITest>False</IsCodedUITest>
|
||||
<TestProjectType>UnitTest</TestProjectType>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Castle.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Castle.Core.5.1.1\lib\net462\Castle.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ApplicationInsights, Version=2.22.0.997, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ApplicationInsights.2.22.0\lib\net46\Microsoft.ApplicationInsights.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Microsoft.Testing.Extensions.Telemetry, Version=1.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Testing.Extensions.Telemetry.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.Telemetry.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Testing.Extensions.TrxReport.Abstractions, Version=1.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Testing.Extensions.TrxReport.Abstractions.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.TrxReport.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Testing.Extensions.VSTestBridge, Version=1.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Testing.Extensions.VSTestBridge.1.0.2\lib\netstandard2.0\Microsoft.Testing.Extensions.VSTestBridge.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Testing.Platform, Version=1.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Testing.Platform.MSBuild.1.0.2\lib\netstandard2.0\Microsoft.Testing.Platform.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Testing.Platform.MSBuild, Version=1.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Testing.Platform.MSBuild.1.0.2\lib\netstandard2.0\Microsoft.Testing.Platform.MSBuild.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TestPlatform.CoreUtilities, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.TestPlatform.CoreUtilities.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TestPlatform.PlatformAbstractions, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.TestPlatform.PlatformAbstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TestPlatform.ObjectModel.17.9.0\lib\net462\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MSTest.TestFramework.3.2.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MSTest.TestFramework.3.2.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Moq, Version=4.20.70.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Moq.4.20.70\lib\net462\Moq.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NuGet.Frameworks, Version=6.9.1.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NuGet.Frameworks.6.9.1\lib\net472\NuGet.Frameworks.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Collections.Immutable, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Collections.Immutable.8.0.0\lib\net462\System.Collections.Immutable.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Diagnostics.DiagnosticSource, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Diagnostics.DiagnosticSource.8.0.0\lib\net462\System.Diagnostics.DiagnosticSource.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Reflection.Metadata, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Reflection.Metadata.8.0.0\lib\net462\System.Reflection.Metadata.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime" />
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="FeatureConfigurationBackupTests.cs" />
|
||||
<Compile Include="FeatureConfigurationMonitorTests.cs" />
|
||||
<Compile Include="FeatureConfigurationStub.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="AutoRestoreMechanismTests.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SafeExamBrowser.Lockdown.Contracts\SafeExamBrowser.Lockdown.Contracts.csproj">
|
||||
<Project>{3368b17d-6060-4482-9983-aa800d74041d}</Project>
|
||||
<Name>SafeExamBrowser.Lockdown.Contracts</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\SafeExamBrowser.Lockdown\SafeExamBrowser.Lockdown.csproj">
|
||||
<Project>{386b6042-3e12-4753-9fc6-c88ea4f97030}</Project>
|
||||
<Name>SafeExamBrowser.Lockdown</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\SafeExamBrowser.Logging.Contracts\SafeExamBrowser.Logging.Contracts.csproj">
|
||||
<Project>{64ea30fb-11d4-436a-9c2b-88566285363e}</Project>
|
||||
<Name>SafeExamBrowser.Logging.Contracts</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\Microsoft.Testing.Platform.MSBuild.1.0.2\build\netstandard2.0\Microsoft.Testing.Platform.MSBuild.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Testing.Platform.MSBuild.1.0.2\build\netstandard2.0\Microsoft.Testing.Platform.MSBuild.props'))" />
|
||||
<Error Condition="!Exists('..\packages\Microsoft.Testing.Platform.MSBuild.1.0.2\build\netstandard2.0\Microsoft.Testing.Platform.MSBuild.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Testing.Platform.MSBuild.1.0.2\build\netstandard2.0\Microsoft.Testing.Platform.MSBuild.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\Microsoft.Testing.Extensions.Telemetry.1.0.2\build\netstandard2.0\Microsoft.Testing.Extensions.Telemetry.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Testing.Extensions.Telemetry.1.0.2\build\netstandard2.0\Microsoft.Testing.Extensions.Telemetry.props'))" />
|
||||
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.3.2.2\build\net462\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.3.2.2\build\net462\MSTest.TestAdapter.props'))" />
|
||||
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.3.2.2\build\net462\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.3.2.2\build\net462\MSTest.TestAdapter.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\Microsoft.Testing.Platform.MSBuild.1.0.2\build\netstandard2.0\Microsoft.Testing.Platform.MSBuild.targets" Condition="Exists('..\packages\Microsoft.Testing.Platform.MSBuild.1.0.2\build\netstandard2.0\Microsoft.Testing.Platform.MSBuild.targets')" />
|
||||
<Import Project="..\packages\MSTest.TestAdapter.3.2.2\build\net462\MSTest.TestAdapter.targets" Condition="Exists('..\packages\MSTest.TestAdapter.3.2.2\build\net462\MSTest.TestAdapter.targets')" />
|
||||
</Project>
|
39
SafeExamBrowser.Lockdown.UnitTests/app.config
Normal file
39
SafeExamBrowser.Lockdown.UnitTests/app.config
Normal file
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="NuGet.Frameworks" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.11.3.1" newVersion="5.11.3.1" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.ApplicationInsights" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.22.0.997" newVersion="2.22.0.997" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" /></startup></configuration>
|
23
SafeExamBrowser.Lockdown.UnitTests/packages.config
Normal file
23
SafeExamBrowser.Lockdown.UnitTests/packages.config
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Castle.Core" version="5.1.1" targetFramework="net48" />
|
||||
<package id="Microsoft.ApplicationInsights" version="2.22.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Testing.Extensions.Telemetry" version="1.0.2" targetFramework="net48" />
|
||||
<package id="Microsoft.Testing.Extensions.TrxReport.Abstractions" version="1.0.2" targetFramework="net48" />
|
||||
<package id="Microsoft.Testing.Extensions.VSTestBridge" version="1.0.2" targetFramework="net48" />
|
||||
<package id="Microsoft.Testing.Platform" version="1.0.2" targetFramework="net48" />
|
||||
<package id="Microsoft.Testing.Platform.MSBuild" version="1.0.2" targetFramework="net48" />
|
||||
<package id="Microsoft.TestPlatform.ObjectModel" version="17.9.0" targetFramework="net48" />
|
||||
<package id="Moq" version="4.20.70" targetFramework="net48" />
|
||||
<package id="MSTest.TestAdapter" version="3.2.2" targetFramework="net48" />
|
||||
<package id="MSTest.TestFramework" version="3.2.2" targetFramework="net48" />
|
||||
<package id="NuGet.Frameworks" version="6.9.1" targetFramework="net48" />
|
||||
<package id="System.Buffers" version="4.5.1" targetFramework="net48" />
|
||||
<package id="System.Collections.Immutable" version="8.0.0" targetFramework="net48" />
|
||||
<package id="System.Diagnostics.DiagnosticSource" version="8.0.0" targetFramework="net48" />
|
||||
<package id="System.Memory" version="4.5.5" targetFramework="net48" />
|
||||
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net48" />
|
||||
<package id="System.Reflection.Metadata" version="8.0.0" targetFramework="net48" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net48" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net48" />
|
||||
</packages>
|
Reference in New Issue
Block a user