Exemplo n.º 1
0
        public void Test()
        {
            GearBuilder sut    = new GearBuilder();
            var         result = sut.BuildUnitgear(new List <Loadout>());

            Assert.NotNull(result);
        }
Exemplo n.º 2
0
        public void ExtractGetConvert_BinarizedFileOnDisc_ReturnsListOfConvertedLoadouts()
        {
            var stopwatch = new Stopwatch();

            //Arrange
            _configFilePath = Path.GetTempFileName();
            File.WriteAllBytes(_configFilePath, Resources.test_vars);

            //Act
            stopwatch.Start();
            var configObjects = _configExtractionService.Extract(_configFilePath);

            var parsingTime = stopwatch.ElapsedMilliseconds;

            stopwatch.Restart();

            var arsenalData = _arsenalEquipmentExtractionService.GetInventoryData(configObjects);

            var extractionTime = stopwatch.ElapsedMilliseconds;

            stopwatch.Restart();

            var convertedData = _sut.Convert(arsenalData);

            var conversionTime = stopwatch.ElapsedMilliseconds;

            stopwatch.Restart();

            var result = _builder.BuildUnitgear(convertedData);

            var unitgearTime = stopwatch.ElapsedMilliseconds;

            stopwatch.Reset();

            //Assert
            Assert.NotNull(result);
            Console.WriteLine($@"{parsingTime}, {extractionTime}, {conversionTime}, {unitgearTime}");
        }