Esempio n. 1
0
        public virtual void TestArguments()
        {
            ConfigExtractor extractor = GetTestConfig(true);

            NUnit.Framework.Assert.AreEqual(extractor.GetOpCount(), Constants.OperationType.Values
                                                ().Length);
            NUnit.Framework.Assert.AreEqual(extractor.GetMapAmount(), 2);
            NUnit.Framework.Assert.AreEqual(extractor.GetReducerAmount(), 2);
            Range <long> apRange = extractor.GetAppendSize();

            NUnit.Framework.Assert.AreEqual(apRange.GetLower(), Constants.Megabytes * 1);
            NUnit.Framework.Assert.AreEqual(apRange.GetUpper(), Constants.Megabytes * 2);
            Range <long> wRange = extractor.GetWriteSize();

            NUnit.Framework.Assert.AreEqual(wRange.GetLower(), Constants.Megabytes * 1);
            NUnit.Framework.Assert.AreEqual(wRange.GetUpper(), Constants.Megabytes * 2);
            Range <long> trRange = extractor.GetTruncateSize();

            NUnit.Framework.Assert.AreEqual(trRange.GetLower(), 0);
            NUnit.Framework.Assert.AreEqual(trRange.GetUpper(), Constants.Megabytes * 1);
            Range <long> bRange = extractor.GetBlockSize();

            NUnit.Framework.Assert.AreEqual(bRange.GetLower(), Constants.Megabytes * 1);
            NUnit.Framework.Assert.AreEqual(bRange.GetUpper(), Constants.Megabytes * 2);
            string resfile = extractor.GetResultFile();

            NUnit.Framework.Assert.AreEqual(resfile, GetResultFile().ToString());
            int durationMs = extractor.GetDurationMilliseconds();

            NUnit.Framework.Assert.AreEqual(durationMs, 10 * 1000);
        }