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

            Read();
        }
Example #6
0
 public bool MultipleReturns(bool value)
 {
     SimpleFile.Clear();
     if (value)
     {
         return(SimpleFile.Write("A"));
     }
     else
     {
         return(SimpleFile.Write("B"));
     }
 }
Example #7
0
 public void MultipleVoid(bool value)
 {
     SimpleFile.Clear();
     if (value)
     {
         SimpleFile.Read();
     }
     else
     {
         SimpleFile.Read();
     }
 }
Example #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");
            });
        }
Example #9
0
 public void That()
 {
     Assert.That(() => Console.WriteLine(""), Throws.Nothing);
     Assert.That(() => SimpleFile.Clear(), Throws.Nothing);
     Assert.That(() => Read(), Throws.Nothing);
 }
Example #10
0
 public void Test2()
 {
     SimpleFile.Clear();
     SimpleFile.Read();
 }
Example #11
0
 public void Test()
 {
     SimpleFile.Clear();
 }