Exemple #1
0
        public void TestMeltDataMeltNumber()
        {
            var meltDataMdb = new MeltDataMdb();

            meltDataMdb.AdaptationData.Should().NotBeNull();
            meltDataMdb.StraightCount.Should().NotBeNull();

            var selectRowDictionary = meltDataMdb.StraightCount.SelectRowDictionary(0);

            selectRowDictionary.Count.Should().BeGreaterThan(0);

            const int MeltColumnIndex = 1;

            var selectRowRange = meltDataMdb.StraightCount.SelectRowRange(MeltColumnIndex);

            Array.FindIndex(selectRowRange, value => value == "220024").Should().Be(MeltColumnIndex);

            const int MeltNumber = 220025;
            var       meltRange  = meltDataMdb.FindMeltRange(MeltNumber);

            meltRange[MeltColumnIndex].Should().Be(MeltNumber.ToStringWithInvariantCulture());

            meltRange[2].Should().Be("4,7");
            meltRange[45].Should().Be("0,1333333");
            meltRange[48].Should().Be("99,732");
        }
Exemple #2
0
        public void TestStraightCountExists()
        {
            var meltDataMdb = new MeltDataMdb();

            meltDataMdb
            .Reader
            .FetchTable("StraightCount")
            .Should()
            .NotBeNull("The table 'StraightCount' should exist");
        }
Exemple #3
0
        private void AssumeStraightCountTableIsValid()
        {
            var meltData = new MeltDataMdb();

            meltData.Tables.Count.Should().BeGreaterThan(0);

            const int ColumnNumberOfMelt = 1;

            var columnRange = meltData.Reader
                              .SelectColumnRange <int>("straightcount", ColumnNumberOfMelt)
                              .ToArray();

            columnRange.Length.Should().BeGreaterThan(0, "Массив количества плавок");

            var max = columnRange.Max();

            max.Should().BeGreaterThan(0, "Номер плавки");
        }
Exemple #4
0
 public Page1ViewModel()
 {
     _paramsMdb   = new ParamsMdb();
     _meltDataMdb = new MeltDataMdb();
 }