NUnit.Framework.Assert.IsInstanceOf(System.Type, object, string)

Here are the examples of the csharp api class NUnit.Framework.Assert.IsInstanceOf(System.Type, object, string) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

25 Examples 7

1. Example

View license
public static void IsInstanceOf(Type type, object target, string message) {
            Assert.IsInstanceOf(type, target, message);
        }

2. Example

Project: GEDKeeper
Source File: MainSDITests.cs
View license
private void StatsWin_Tests(Form frm, string stage)
        {
            Assert.IsInstanceOf(typeof(StatisticsWin), frm, stage);

            ModalFormHandler = SaveFile_Cancel_Handler;
            ClickToolStripButton("tbExcelExport", frm);

            KeyDownForm(frm.Name, Keys.Escape);
            frm.Dispose();
        }

3. Example

Project: GEDKeeper
Source File: MainSDITests.cs
View license
private void MapsViewerWin_Tests(Form frm, string stage)
        {
            Assert.IsInstanceOf(typeof(MapsViewerWin), frm, stage);

            ClickRadioButton("radTotal", frm);

            ModalFormHandler = SaveFile_Cancel_Handler;
            ClickButton("btnSaveImage", frm);

            KeyDownForm(frm.Name, Keys.Escape);
            frm.Dispose();
        }

4. Example

View license
[Test]
        public void Clone()
        {
            var criterion = new FailureStopCriterion<float>();
            Assert.IsNotNull(criterion, "There should be a criterion");

            var clone = criterion.Clone();
            Assert.IsInstanceOf(typeof (FailureStopCriterion<float>), clone, "Wrong criterion type");
        }

5. Example

View license
[Test]
        public void Clone()
        {
            var criterion = new FailureStopCriterion<Complex>();
            Assert.IsNotNull(criterion, "There should be a criterion");
            var clone = criterion.Clone();
            Assert.IsInstanceOf(typeof (FailureStopCriterion<Complex>), clone, "Wrong criterion type");
        }

6. Example

View license
[Test]
        public void Clone()
        {
            var criterion = new FailureStopCriterion<double>();
            Assert.IsNotNull(criterion, "There should be a criterion");
            var clone = criterion.Clone();
            Assert.IsInstanceOf(typeof (FailureStopCriterion<double>), clone, "Wrong criterion type");
        }

7. Example

View license
[Test]
        public void Clone()
        {
            var criterion = new FailureStopCriterion<Complex32>();
            Assert.IsNotNull(criterion, "There should be a criterion");

            var clone = criterion.Clone();
            Assert.IsInstanceOf(typeof (FailureStopCriterion<Complex32>), clone, "Wrong criterion type");
        }

8. Example

Project: GEDKeeper
Source File: MainSDITests.cs
View license
private void SlideshowWin_Tests(Form frm, string stage)
        {
            Assert.IsInstanceOf(typeof(SlideshowWin), frm, stage);

            SlideshowWin slidesWin = (SlideshowWin)frm;

            Assert.IsNotNull(slidesWin.FindAll(""));

            Assert.AreEqual(false, slidesWin.AllowFilter());
            slidesWin.SetFilter();

            slidesWin.SelectByRec(null);
            slidesWin.UpdateView();

            Assert.AreEqual(false, slidesWin.AllowQuickSearch());
            slidesWin.QuickSearch();

            Assert.AreEqual(false, slidesWin.NavCanBackward());
            slidesWin.NavPrev();

            Assert.AreEqual(false, slidesWin.NavCanForward());
            slidesWin.NavNext();

            ClickToolStripButton("tbStart", frm); // start
            ClickToolStripButton("tbStart", frm); // stop

            ClickToolStripButton("tbNext", frm);
            ClickToolStripButton("tbPrev", frm);

            KeyDownForm(frm.Name, Keys.Escape);
            frm.Dispose();
        }

9. Example

View license
[Test]
        public void Clone()
        {
            var criterion = new IterationCountStopCriterion<double>(10);
            Assert.IsNotNull(criterion, "A criterion should have been created");
            Assert.AreEqual(10, criterion.MaximumNumberOfIterations, "Incorrect maximum");

            var clone = criterion.Clone();
            Assert.IsInstanceOf(typeof (IterationCountStopCriterion<double>), clone, "Wrong criterion type");

            var clonedCriterion = clone as IterationCountStopCriterion<double>;
            Assert.IsNotNull(clonedCriterion);

            // ReSharper disable PossibleNullReferenceException
            Assert.AreEqual(criterion.MaximumNumberOfIterations, clonedCriterion.MaximumNumberOfIterations, "Clone failed");

            // ReSharper restore PossibleNullReferenceException
        }

10. Example

View license
[Test]
        public void Clone()
        {
            var criterion = new ResidualStopCriterion<Complex32>(1e-3f, 10);

            var clone = criterion.Clone();
            Assert.IsInstanceOf(typeof(ResidualStopCriterion<Complex32>), clone, "Wrong criterion type");

            var clonedCriterion = clone as ResidualStopCriterion<Complex32>;
            Assert.IsNotNull(clonedCriterion);

            Assert.AreEqual(criterion.Maximum, clonedCriterion.Maximum, "Clone failed");
            Assert.AreEqual(criterion.MinimumIterationsBelowMaximum, clonedCriterion.MinimumIterationsBelowMaximum, "Clone failed");
        }

11. Example

View license
[Test]
        public void Clone()
        {
            var criterion = new IterationCountStopCriterion<Complex32>(10);
            Assert.IsNotNull(criterion, "A criterion should have been created");
            Assert.AreEqual(10, criterion.MaximumNumberOfIterations, "Incorrect maximum");

            var clone = criterion.Clone();
            Assert.IsInstanceOf(typeof (IterationCountStopCriterion<Complex32>), clone, "Wrong criterion type");

            var clonedCriterion = clone as IterationCountStopCriterion<Complex32>;
            Assert.IsNotNull(clonedCriterion);

            // ReSharper disable PossibleNullReferenceException
            Assert.AreEqual(criterion.MaximumNumberOfIterations, clonedCriterion.MaximumNumberOfIterations, "Clone failed");

            // ReSharper restore PossibleNullReferenceException
        }

12. Example

View license
[Test]
        public void Clone()
        {
            var criterion = new ResidualStopCriterion<Complex>(1e-3, 10);

            var clone = criterion.Clone();
            Assert.IsInstanceOf(typeof (ResidualStopCriterion<Complex>), clone, "Wrong criterion type");

            var clonedCriterion = clone as ResidualStopCriterion<Complex>;
            Assert.IsNotNull(clonedCriterion);

            // ReSharper disable PossibleNullReferenceException
            Assert.AreEqual(criterion.Maximum, clonedCriterion.Maximum, "Clone failed");
            Assert.AreEqual(criterion.MinimumIterationsBelowMaximum, clonedCriterion.MinimumIterationsBelowMaximum, "Clone failed");

            // ReSharper restore PossibleNullReferenceException
        }

13. Example

View license
[Test]
        public void Clone()
        {
            var criterion = new IterationCountStopCriterion<Complex>(10);
            Assert.IsNotNull(criterion, "A criterion should have been created");
            Assert.AreEqual(10, criterion.MaximumNumberOfIterations, "Incorrect maximum");

            var clone = criterion.Clone();
            Assert.IsInstanceOf(typeof (IterationCountStopCriterion<Complex>), clone, "Wrong criterion type");

            var clonedCriterion = clone as IterationCountStopCriterion<Complex>;
            Assert.IsNotNull(clonedCriterion);

            // ReSharper disable PossibleNullReferenceException
            Assert.AreEqual(criterion.MaximumNumberOfIterations, clonedCriterion.MaximumNumberOfIterations, "Clone failed");

            // ReSharper restore PossibleNullReferenceException
        }

14. Example

View license
[Test]
        public void Clone()
        {
            var criterion = new ResidualStopCriterion<float>(1e-3f, 10);

            var clone = criterion.Clone();
            Assert.IsInstanceOf(typeof (ResidualStopCriterion<float>), clone, "Wrong criterion type");

            var clonedCriterion = clone as ResidualStopCriterion<float>;
            Assert.IsNotNull(clonedCriterion);

            // ReSharper disable PossibleNullReferenceException
            Assert.AreEqual(criterion.Maximum, clonedCriterion.Maximum, "Clone failed");
            Assert.AreEqual(criterion.MinimumIterationsBelowMaximum, clonedCriterion.MinimumIterationsBelowMaximum, "Clone failed");

            // ReSharper restore PossibleNullReferenceException
        }

15. Example

View license
[Test]
        public void Clone()
        {
            var criterion = new ResidualStopCriterion<double>(1e-3, 10);

            var clone = criterion.Clone();
            Assert.IsInstanceOf(typeof (ResidualStopCriterion<double>), clone, "Wrong criterion type");

            var clonedCriterion = clone as ResidualStopCriterion<double>;
            Assert.IsNotNull(clonedCriterion);

            // ReSharper disable PossibleNullReferenceException
            Assert.AreEqual(criterion.Maximum, clonedCriterion.Maximum, "Clone failed");
            Assert.AreEqual(criterion.MinimumIterationsBelowMaximum, clonedCriterion.MinimumIterationsBelowMaximum, "Clone failed");

            // ReSharper restore PossibleNullReferenceException
        }

16. Example

View license
[Test]
        public void Clone()
        {
            var criterion = new IterationCountStopCriterion<float>(10);
            Assert.IsNotNull(criterion, "A criterion should have been created");
            Assert.AreEqual(10, criterion.MaximumNumberOfIterations, "Incorrect maximum");

            var clone = criterion.Clone();
            Assert.IsInstanceOf(typeof(IterationCountStopCriterion<float>), clone, "Wrong criterion type");

            var clonedCriterion = clone as IterationCountStopCriterion<float>;
            Assert.IsNotNull(clonedCriterion);

            // ReSharper disable PossibleNullReferenceException
            Assert.AreEqual(criterion.MaximumNumberOfIterations, clonedCriterion.MaximumNumberOfIterations, "Clone failed");

            // ReSharper restore PossibleNullReferenceException
        }

17. Example

View license
[Test]
        public void Clone()
        {
            const double Increase = 0.5;
            const int Iterations = 10;

            var criterion = new DivergenceStopCriterion<double>(Increase, Iterations);
            Assert.IsNotNull(criterion, "There should be a criterion");

            var clone = criterion.Clone();
            Assert.IsInstanceOf(typeof (DivergenceStopCriterion<double>), clone, "Wrong criterion type");

            var clonedCriterion = clone as DivergenceStopCriterion<double>;
            Assert.IsNotNull(clonedCriterion);

            Assert.AreEqual(criterion.MaximumRelativeIncrease, clonedCriterion.MaximumRelativeIncrease, "Incorrect maximum");
            Assert.AreEqual(criterion.MinimumNumberOfIterations, clonedCriterion.MinimumNumberOfIterations, "Incorrect iteration count");
        }

18. Example

View license
[Test]
        public void Clone()
        {
            const float Increase = 0.5f;
            const int Iterations = 10;

            var criterion = new DivergenceStopCriterion<Complex32>(Increase, Iterations);
            Assert.IsNotNull(criterion, "There should be a criterion");

            var clone = criterion.Clone();
            Assert.IsInstanceOf(typeof (DivergenceStopCriterion<Complex32>), clone, "Wrong criterion type");

            var clonedCriterion = clone as DivergenceStopCriterion<Complex32>;
            Assert.IsNotNull(clonedCriterion);

            Assert.AreEqual(criterion.MaximumRelativeIncrease, clonedCriterion.MaximumRelativeIncrease, "Incorrect maximum");
            Assert.AreEqual(criterion.MinimumNumberOfIterations, clonedCriterion.MinimumNumberOfIterations, "Incorrect iteration count");
        }

19. Example

View license
[Test]
        public void Clone()
        {
            const double Increase = 0.5;
            const int Iterations = 10;

            var criterion = new DivergenceStopCriterion<float>(Increase, Iterations);
            Assert.IsNotNull(criterion, "There should be a criterion");

            var clone = criterion.Clone();
            Assert.IsInstanceOf(typeof (DivergenceStopCriterion<float>), clone, "Wrong criterion type");

            var clonedCriterion = clone as DivergenceStopCriterion<float>;
            Assert.IsNotNull(clonedCriterion);

            Assert.AreEqual(criterion.MaximumRelativeIncrease, clonedCriterion.MaximumRelativeIncrease, "Incorrect maximum");
            Assert.AreEqual(criterion.MinimumNumberOfIterations, clonedCriterion.MinimumNumberOfIterations, "Incorrect iteration count");
        }

20. Example

View license
public void CollectionPropertyCollectionResolveStateIsPersistent() {
            var relativesAdapter = GetAdaptedRelatives(GetPerson(1));
            Assert.IsTrue(relativesAdapter.ResolveState.IsPersistent(), "should be persistent");
            //  Assert.IsFalse(relativesAdapter.ResolveState.IsResolved(), "should not be resolved");
            Assert.IsNotNull(relativesAdapter.Oid, "is  null");
            Assert.IsInstanceOf(typeof (IAggregateOid), relativesAdapter.Oid, "is not aggregate");
        }

21. Example

View license
public void EmptyCollectionPropertyCollectionResolveStateIsPersistent() {
            var relativesAdapter = GetAdaptedRelatives(GetPerson(2));
            Assert.IsTrue(relativesAdapter.ResolveState.IsPersistent(), "should be persistent");
            //  Assert.IsFalse(relativesAdapter.ResolveState.IsResolved(), "should not be resolved");
            Assert.IsNotNull(relativesAdapter.Oid, "is  null");
            Assert.IsInstanceOf(typeof (IAggregateOid), relativesAdapter.Oid, "is not aggregate");
        }

22. Example

View license
[Test]
        public void Clone()
        {
            const double Increase = 0.5;
            const int Iterations = 10;

            var criterion = new DivergenceStopCriterion<Complex>(Increase, Iterations);
            Assert.IsNotNull(criterion, "There should be a criterion");

            var clone = criterion.Clone();
            Assert.IsInstanceOf(typeof (DivergenceStopCriterion<Complex>), clone, "Wrong criterion type");

            var clonedCriterion = clone as DivergenceStopCriterion<Complex>;
            Assert.IsNotNull(clonedCriterion);

            Assert.AreEqual(criterion.MaximumRelativeIncrease, clonedCriterion.MaximumRelativeIncrease, "Incorrect maximum");
            Assert.AreEqual(criterion.MinimumNumberOfIterations, clonedCriterion.MinimumNumberOfIterations, "Incorrect iteration count");
        }

23. Example

View license
[Test]
        public void DeserializationExceptionIsProperlySurfacedByAsyncRequests()
        {
   /n ..... /n //View Source file for more details /n }

24. Example

Project: GEDKeeper
Source File: MainSDITests.cs
View license
private void CircleChartWin_Tests(Form frm, string stage)
        {
            Assert.IsInstanceOf(typeof(CircleChartWin), frm, stage);

            CircleChartWin ccWin = frm as CircleChartWin;
            Assert.AreEqual(fCurBase, ccWin.Base);
            ccWin.UpdateView();

            Assert.IsFalse(ccWin.AllowFilter());
            Assert.IsFalse(ccWin.AllowQuickSearch());
            Assert.IsTrue(ccWin.AllowPrint());

            // forced update
            ccWin.Refresh();

            Assert.IsFalse(ccWin.NavCanBackward());
            ccWin.NavPrev();
            Assert.IsFalse(ccWin.NavCanForward());
            ccWin.NavNext();

            var ctl = new ControlTester("fCircleChart", frm);
            ctl.FireEvent("KeyDown", new KeyEventArgs(Keys.Add));
            ctl.FireEvent("KeyDown", new KeyEventArgs(Keys.Subtract));
            ctl.FireEvent("KeyDown", new KeyEventArgs(Keys.Left));
            ctl.FireEvent("KeyDown", new KeyEventArgs(Keys.Back));
            ctl.FireEvent("KeyDown", new KeyEventArgs(Keys.Right));

            ctl.FireEvent("DoubleClick", new EventArgs());
            ctl.Properties.Refresh();
            ctl.FireEvent("DoubleClick", new EventArgs());

            // empty methods
            Assert.IsNotNull(ccWin.FindAll(""));
            ccWin.QuickSearch();
            ccWin.SelectByRec(null);
            ccWin.SetFilter();

            KeyDownForm(frm.Name, Keys.Escape);
            frm.Dispose();
        }

25. Example

Project: GEDKeeper
Source File: MainSDITests.cs
View license
private void TreeChartWin_Tests(Form frm, TreeChartKind kind, string stage, string checkXRef)
      /n ..... /n //View Source file for more details /n }