Ejemplo n.º 1
0
 public void Test()
 {
     Assert.That(() =>
     {
         SimpleFile.Clear();
         return(SimpleFile.Write(""));
     }, Throws.Nothing);
 }
Ejemplo n.º 2
0
 public void Test()
 {
     Runner.RunGeneric(() =>
     {
         SimpleFile.Clear();
         return(SimpleFile.Write(""));
     });
 }
Ejemplo n.º 3
0
 public void Test()
 {
     Runner.Run(s =>
     {
         SimpleFile.Clear();
         SimpleFile.Write("");
     });
 }
Ejemplo n.º 4
0
 public void Test()
 {
     Assert.DoesNotThrow(() =>
     {
         SimpleFile.Clear();
         SimpleFile.Read();
     });
 }
Ejemplo n.º 5
0
        public void Test()
        {
            void Read()
            {
                SimpleFile.Clear();
                SimpleFile.Read();
            }

            Read();
        }
Ejemplo n.º 6
0
 public bool MultipleReturns(bool value)
 {
     SimpleFile.Clear();
     if (value)
     {
         return(SimpleFile.Write("A"));
     }
     else
     {
         return(SimpleFile.Write("B"));
     }
 }
Ejemplo n.º 7
0
 public void MultipleVoid(bool value)
 {
     SimpleFile.Clear();
     if (value)
     {
         SimpleFile.Read();
     }
     else
     {
         SimpleFile.Read();
     }
 }
Ejemplo n.º 8
0
        public void MultipleWithDoesNotThrow()
        {
            Assert.Multiple(() =>
            {
                Assert.DoesNotThrow(() => SimpleFile.Read());
                Assert.DoesNotThrow(() => SimpleFile.Read(), "test");
            });

            Assert.Multiple(() =>
            {
                Assert.DoesNotThrow(() => SimpleFile.Read());
                Assert.DoesNotThrow(() => SimpleFile.Clear(), "test");
            });

            Assert.Multiple(() =>
            {
                Assert.DoesNotThrow(() => SimpleFile.Clear());
                Assert.DoesNotThrow(() => SimpleFile.Clear(), "test");
            });
        }
Ejemplo n.º 9
0
 public void That()
 {
     Assert.That(() => Console.WriteLine(""), Throws.Nothing);
     Assert.That(() => SimpleFile.Clear(), Throws.Nothing);
     Assert.That(() => Read(), Throws.Nothing);
 }
Ejemplo n.º 10
0
 public void Test2()
 {
     SimpleFile.Clear();
     SimpleFile.Read();
 }
Ejemplo n.º 11
0
 public void Test()
 {
     SimpleFile.Clear();
 }