コード例 #1
0
		public void SetUp()
		{
			this.parser = new MockParser();
            List<IParse> parsers = new List<IParse>(1);
			parsers.Add(parser);
			this.instrumenter = new FileCopyInstrumenter(parsers.ToArray());
		}
コード例 #2
0
		public void TestProperties()
		{
			Assert.IsNotNull(this.action.Filenames);
			Assert.IsNotNull(this.action.Settings);

			ReportSettings rs = new ReportSettings();
			this.action.Settings = rs;

			Instrumenter instrumenter = new FileCopyInstrumenter(null);
			this.action.Instrumenter = instrumenter;

			Assert.AreEqual(rs, this.action.Settings);
			Assert.AreEqual(instrumenter, this.action.Instrumenter);
		}
コード例 #3
0
		public void TestProperties()
		{
            Assert.IsNotNull(this.action.Filenames, "action.Filenames should no be null");
            Assert.IsNotNull(this.action.Settings, "action.Settings should no be null");
            Assert.IsNull(this.action.Instrumenter, "action.Instrumenter will be initialized on execute");

			StringCollection sc = new StringCollection();
			this.action.Filenames = sc;

			ReportSettings rs = new ReportSettings();
			this.action.Settings = rs;

            List<IParse> parsers = new List<IParse>(1);
			parsers.Add(new Parser(rs));
			Instrumenter instrumenter = new FileCopyInstrumenter(parsers.ToArray());
			this.action.Instrumenter = instrumenter;

			Assert.AreEqual(sc, this.action.Filenames);
			Assert.AreEqual(rs, this.action.Settings);
			Assert.AreEqual(instrumenter, this.action.Instrumenter);
		}