public Worker(ILogger <Worker> logger, ICommandService commandService) { _commandService = commandService; _clientMachineInfo = new ClientMachineInfo(); _logger = logger; _hubConnection = new HubConnectionBuilder() .WithUrl("http://localhost:49175/commands") .Build(); }
public void Client_WhenCreatingClientMustReturnMachineName() { //Arrange var client = new ClientMachineInfo(); //Act var clientMachineName = "Localhost"; var name = client.Name; //Assert Assert.NotEqual(name, clientMachineName); }
public void Client_WhenCreatingClientMustReturnDotNetVersion() { //Arrange var client = new ClientMachineInfo(); //Act var dotnetVersion = "3.1.200"; var clientDotnetVersion = client.DotnetVersion; //Assert Assert.NotEqual(dotnetVersion, clientDotnetVersion); }
public void Client_WhenCreatingClientMustReturnOSVersion() { //Arrange var client = new ClientMachineInfo(); //Act var osVersion = "Windows 10"; var clientOSVersion = client.OSVersion; //Assert Assert.NotEqual(osVersion, clientOSVersion); }
public void Client_WhenCreatingClientMustReturnAntiVirusName() { //Arrange var client = new ClientMachineInfo(); //Act var avLocal = "Avast"; var clientAV = client.AntiVirusName; //Assert Assert.NotEqual(avLocal, clientAV); }
public void Client_WhenCreatingClientMustReturnIPAddress() { //Arrange var client = new ClientMachineInfo(); //Act var ipLocal = "192.168.88.150"; var clientIP = client.IP; //Assert Assert.Equal(ipLocal, clientIP); }
public void Client_WhenCreatingClientMustReturnHDInformation() { //Arrange var client = new ClientMachineInfo(); //Act var freeSpace = client.HardDiskInfo["C-FreeSpace"]; var totalSize = client.HardDiskInfo["C-TotalSize"]; //Assert Assert.NotEqual(0, freeSpace); Assert.NotEqual(0, totalSize); }
public async Task SendMachineInfo(ClientMachineInfo clientMachineInfo, string user) => await Clients.All.SendInfoClientMachine(clientMachineInfo, user);