[from now] 2014/10/12 14:12:09

diff --git a/ClassLibrary1/Class1.cs b/ClassLibrary1/Class1.cs
index 08281c6..1362e31 100644
--- a/ClassLibrary1/Class1.cs
+++ b/ClassLibrary1/Class1.cs
@@ -8,5 +8,8 @@ namespace ClassLibrary1
 {
     public class Class1
     {
+
+
+
     }
 }
[from now] 2014/10/12 14:58:59

diff --git a/ClassLibrary1.Test/Class1.cs b/ClassLibrary1.Test/Class1.cs
deleted file mode 100644
index 7d6efde..0000000
--- a/ClassLibrary1.Test/Class1.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace ClassLibrary1.Test
-{
-    public class Class1
-    {
-    }
-}
diff --git a/ClassLibrary1.Test/ClassLibrary1.Test.csproj b/ClassLibrary1.Test/ClassLibrary1.Test.csproj
index 8c6e103..cf75ddc 100644
--- a/ClassLibrary1.Test/ClassLibrary1.Test.csproj
+++ b/ClassLibrary1.Test/ClassLibrary1.Test.csproj
@@ -42,12 +42,18 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="Class1.cs" />
+    <Compile Include="ScoreBoardTest.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
   <ItemGroup>
     <None Include="packages.config" />
   </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\ClassLibrary1\ClassLibrary1.csproj">
+      <Project>{660d5497-deb4-4451-a8a0-70e4e2944569}</Project>
+      <Name>ClassLibrary1</Name>
+    </ProjectReference>
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
        Other similar extension points exist, see Microsoft.Common.targets.
diff --git a/ClassLibrary1/Class1.cs b/ClassLibrary1/Class1.cs
deleted file mode 100644
index 1362e31..0000000
--- a/ClassLibrary1/Class1.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace ClassLibrary1
-{
-    public class Class1
-    {
-
-
-
-    }
-}
diff --git a/ClassLibrary1/ClassLibrary1.csproj b/ClassLibrary1/ClassLibrary1.csproj
index c94e088..e0585f8 100644
--- a/ClassLibrary1/ClassLibrary1.csproj
+++ b/ClassLibrary1/ClassLibrary1.csproj
@@ -39,8 +39,8 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="Class1.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="ScoreBoard.cs" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
[from now] 2014/10/12 15:01:10

diff --git a/ClassLibrary1.Test/ScoreBoardTest.cs b/ClassLibrary1.Test/ScoreBoardTest.cs
new file mode 100644
index 0000000..f4a7ecb
--- /dev/null
+++ b/ClassLibrary1.Test/ScoreBoardTest.cs
@@ -0,0 +1,21 @@
+﻿using NUnit.Framework;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ClassLibrary1.Test
+{
+    [TestFixture]
+    public class ScoreBoardTest
+    {
+        [Test]
+        public void ScoreBoardを生成した直後Playerのスコアは0である()
+        {
+            int expected = 0;
+            int actual = new ScoreBoard().getScorePlayer1();
+            Assert.That(actual, Is.EqualTo(expected));
+        }
+    }
+}
diff --git a/ClassLibrary1/ScoreBoard.cs b/ClassLibrary1/ScoreBoard.cs
new file mode 100644
index 0000000..f4c9a40
--- /dev/null
+++ b/ClassLibrary1/ScoreBoard.cs
@@ -0,0 +1,17 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace ClassLibrary1
+{
+    public class ScoreBoard
+    {
+        int player1Score = 0;
+
+        public int getScorePlayer1()
+        {
+            return this.player1Score;
+        }
+    }
+}
[from now] 2014/10/12 15:04:37

diff --git a/ClassLibrary1.Test/ScoreBoardTest.cs b/ClassLibrary1.Test/ScoreBoardTest.cs
index f4a7ecb..a1e9997 100644
--- a/ClassLibrary1.Test/ScoreBoardTest.cs
+++ b/ClassLibrary1.Test/ScoreBoardTest.cs
@@ -11,11 +11,18 @@ namespace ClassLibrary1.Test
     public class ScoreBoardTest
     {
         [Test]
-        public void ScoreBoardを生成した直後Playerのスコアは0である()
+        public void ScoreBoardを生成した直後Player1のスコアは0である()
         {
             int expected = 0;
             int actual = new ScoreBoard().getScorePlayer1();
             Assert.That(actual, Is.EqualTo(expected));
         }
+        [Test]
+        public void ScoreBoardを生成した直後Player2のスコアは0である()
+        {
+            int expected = 0;
+            int actual = new ScoreBoard().getScorePlayer2();
+            Assert.That(actual, Is.EqualTo(expected));
+        }
     }
 }
diff --git a/ClassLibrary1/ScoreBoard.cs b/ClassLibrary1/ScoreBoard.cs
index f4c9a40..761ae7e 100644
--- a/ClassLibrary1/ScoreBoard.cs
+++ b/ClassLibrary1/ScoreBoard.cs
@@ -8,10 +8,16 @@ namespace ClassLibrary1
     public class ScoreBoard
     {
         int player1Score = 0;
+        int player2Score = 0;

         public int getScorePlayer1()
         {
             return this.player1Score;
         }
+
+        public int getScorePlayer2()
+        {
+            return this.player2Score;
+        }
     }
 }
[from now] 2014/10/12 15:19:02

diff --git a/ClassLibrary1.Test/ScoreBoardTest.cs b/ClassLibrary1.Test/ScoreBoardTest.cs
index a1e9997..3987de6 100644
--- a/ClassLibrary1.Test/ScoreBoardTest.cs
+++ b/ClassLibrary1.Test/ScoreBoardTest.cs
@@ -24,5 +24,15 @@ namespace ClassLibrary1.Test
             int actual = new ScoreBoard().getScorePlayer2();
             Assert.That(actual, Is.EqualTo(expected));
         }
+
+        [Test]
+        public void ScoreBoardを生成した直後にPlayer1にwonPointを実行すると1()
+        {
+            int expected = 1;
+            ScoreBoard target = new ScoreBoard();
+            target.WonPoint(Player.Player1);
+            Assert.That(target.getScorePlayer1(), Is.EqualTo(expected));
+        }
+
     }
 }
diff --git a/ClassLibrary1/ScoreBoard.cs b/ClassLibrary1/ScoreBoard.cs
index 761ae7e..d4844df 100644
--- a/ClassLibrary1/ScoreBoard.cs
+++ b/ClassLibrary1/ScoreBoard.cs
@@ -5,6 +5,12 @@ using System.Text;

 namespace ClassLibrary1
 {
+    public enum Player
+    {
+        Player1,
+        Player2
+    }
+
     public class ScoreBoard
     {
         int player1Score = 0;
@@ -19,5 +25,10 @@ namespace ClassLibrary1
         {
             return this.player2Score;
         }
+
+        public void WonPoint(Player player)
+        {
+            player1Score = 1;
+        }
     }
 }
[from now] 2014/10/12 15:23:37

diff --git a/ClassLibrary1.Test/ScoreBoardTest.cs b/ClassLibrary1.Test/ScoreBoardTest.cs
index 3987de6..77beae1 100644
--- a/ClassLibrary1.Test/ScoreBoardTest.cs
+++ b/ClassLibrary1.Test/ScoreBoardTest.cs
@@ -33,6 +33,14 @@ namespace ClassLibrary1.Test
             target.WonPoint(Player.Player1);
             Assert.That(target.getScorePlayer1(), Is.EqualTo(expected));
         }
-
+
+        [Test]
+        public void ScoreBoardを生成した直後にPlayer2にwonPointを実行すると1()
+        {
+            int expected = 1;
+            ScoreBoard target = new ScoreBoard();
+            target.WonPoint(Player.Player2);
+            Assert.That(target.getScorePlayer2(), Is.EqualTo(expected));
+        }
     }
 }
diff --git a/ClassLibrary1/ScoreBoard.cs b/ClassLibrary1/ScoreBoard.cs
index d4844df..cd542df 100644
--- a/ClassLibrary1/ScoreBoard.cs
+++ b/ClassLibrary1/ScoreBoard.cs
@@ -28,7 +28,10 @@ namespace ClassLibrary1

         public void WonPoint(Player player)
         {
+
             player1Score = 1;
+            player2Score = 1;
+
         }
     }
 }
[from now] 2014/10/12 15:37:38

diff --git a/ClassLibrary1.Test/ScoreBoardTest.cs b/ClassLibrary1.Test/ScoreBoardTest.cs
index 77beae1..0ba6602 100644
--- a/ClassLibrary1.Test/ScoreBoardTest.cs
+++ b/ClassLibrary1.Test/ScoreBoardTest.cs
@@ -25,7 +25,7 @@ namespace ClassLibrary1.Test
             Assert.That(actual, Is.EqualTo(expected));
         }

-        [Test]
+        [Test][Ignore]
         public void ScoreBoardを生成した直後にPlayer1にwonPointを実行すると1()
         {
             int expected = 1;
@@ -42,5 +42,21 @@ namespace ClassLibrary1.Test
             target.WonPoint(Player.Player2);
             Assert.That(target.getScorePlayer2(), Is.EqualTo(expected));
         }
+
+        [Test]
+        public void player1が指定された場合player1のスコアが１増える()
+        {
+
+            int expected = 3;
+            ScoreBoard target = new ScoreBoard();
+            target.WonPoint(Player.Player1);
+            target.WonPoint(Player.Player1);
+            target.WonPoint(Player.Player1);
+
+            int actual = target.getScorePlayer1();
+            Assert.That(actual, Is.EqualTo(expected));
+
+        }
+
     }
 }
diff --git a/ClassLibrary1/ScoreBoard.cs b/ClassLibrary1/ScoreBoard.cs
index cd542df..5484767 100644
--- a/ClassLibrary1/ScoreBoard.cs
+++ b/ClassLibrary1/ScoreBoard.cs
@@ -29,7 +29,7 @@ namespace ClassLibrary1
         public void WonPoint(Player player)
         {

-            player1Score = 1;
+            player1Score = 3;
             player2Score = 1;

         }
[from now] 2014/10/12 15:39:56

diff --git a/ClassLibrary1.Test/ScoreBoardTest.cs b/ClassLibrary1.Test/ScoreBoardTest.cs
index 0ba6602..ffe1e6b 100644
--- a/ClassLibrary1.Test/ScoreBoardTest.cs
+++ b/ClassLibrary1.Test/ScoreBoardTest.cs
@@ -25,7 +25,7 @@ namespace ClassLibrary1.Test
             Assert.That(actual, Is.EqualTo(expected));
         }

-        [Test][Ignore]
+        [Test]
         public void ScoreBoardを生成した直後にPlayer1にwonPointを実行すると1()
         {
             int expected = 1;
@@ -46,7 +46,6 @@ namespace ClassLibrary1.Test
         [Test]
         public void player1が指定された場合player1のスコアが１増える()
         {
-
             int expected = 3;
             ScoreBoard target = new ScoreBoard();
             target.WonPoint(Player.Player1);
@@ -55,8 +54,9 @@ namespace ClassLibrary1.Test

             int actual = target.getScorePlayer1();
             Assert.That(actual, Is.EqualTo(expected));
-
         }
+
+

     }
 }
diff --git a/ClassLibrary1/ScoreBoard.cs b/ClassLibrary1/ScoreBoard.cs
index 5484767..10f4c1b 100644
--- a/ClassLibrary1/ScoreBoard.cs
+++ b/ClassLibrary1/ScoreBoard.cs
@@ -29,7 +29,7 @@ namespace ClassLibrary1
         public void WonPoint(Player player)
         {

-            player1Score = 3;
+            player1Score++;
             player2Score = 1;

         }
[from now] 2014/10/12 15:50:26

diff --git a/ClassLibrary1.Test/ScoreBoardTest.cs b/ClassLibrary1.Test/ScoreBoardTest.cs
index ffe1e6b..543c14a 100644
--- a/ClassLibrary1.Test/ScoreBoardTest.cs
+++ b/ClassLibrary1.Test/ScoreBoardTest.cs
@@ -10,49 +10,36 @@ namespace ClassLibrary1.Test
     [TestFixture]
     public class ScoreBoardTest
     {
-        [Test]
-        public void ScoreBoardを生成した直後Player1のスコアは0である()
+        [TestCase(Player.Player1)]
+        [TestCase(Player.Player2)]
+        public void ScoreBoardを生成した直後Playerのスコアは0である(Player player)
         {
             int expected = 0;
-            int actual = new ScoreBoard().getScorePlayer1();
+            int actual = new ScoreBoard().getScorePlayer(player);
             Assert.That(actual, Is.EqualTo(expected));
         }
-        [Test]
-        public void ScoreBoardを生成した直後Player2のスコアは0である()
-        {
-            int expected = 0;
-            int actual = new ScoreBoard().getScorePlayer2();
-            Assert.That(actual, Is.EqualTo(expected));
-        }
-
-        [Test]
-        public void ScoreBoardを生成した直後にPlayer1にwonPointを実行すると1()
-        {
-            int expected = 1;
-            ScoreBoard target = new ScoreBoard();
-            target.WonPoint(Player.Player1);
-            Assert.That(target.getScorePlayer1(), Is.EqualTo(expected));
-        }

-        [Test]
-        public void ScoreBoardを生成した直後にPlayer2にwonPointを実行すると1()
+        [TestCase(Player.Player1)]
+        [TestCase(Player.Player2)]
+        public void ScoreBoardを生成した直後にPlayerにwonPointを実行すると1(Player player)
         {
             int expected = 1;
             ScoreBoard target = new ScoreBoard();
-            target.WonPoint(Player.Player2);
-            Assert.That(target.getScorePlayer2(), Is.EqualTo(expected));
+            target.WonPoint(player);
+            Assert.That(target.getScorePlayer(player), Is.EqualTo(expected));
         }

-        [Test]
-        public void player1が指定された場合player1のスコアが１増える()
+        [TestCase(Player.Player1)]
+        [TestCase(Player.Player2)]
+        public void player1が指定された場合player1のスコアが１増える(Player player)
         {
             int expected = 3;
             ScoreBoard target = new ScoreBoard();
-            target.WonPoint(Player.Player1);
-            target.WonPoint(Player.Player1);
-            target.WonPoint(Player.Player1);
-
-            int actual = target.getScorePlayer1();
+            target.WonPoint(player);
+            target.WonPoint(player);
+            target.WonPoint(player);
+
+            int actual = target.getScorePlayer(player);
             Assert.That(actual, Is.EqualTo(expected));
         }

diff --git a/ClassLibrary1/ScoreBoard.cs b/ClassLibrary1/ScoreBoard.cs
index 10f4c1b..52ffb20 100644
--- a/ClassLibrary1/ScoreBoard.cs
+++ b/ClassLibrary1/ScoreBoard.cs
@@ -16,21 +16,23 @@ namespace ClassLibrary1
         int player1Score = 0;
         int player2Score = 0;

-        public int getScorePlayer1()
+        public int getScorePlayer(Player player)
         {
-            return this.player1Score;
-        }
+            if (Player.Player1 == player) {
+                return this.player1Score;
+            }
+            else
+            {
+                return this.player2Score;
+            }

-        public int getScorePlayer2()
-        {
-            return this.player2Score;
         }

         public void WonPoint(Player player)
         {

             player1Score++;
-            player2Score = 1;
+            player2Score++;

         }
     }
[from now] 2014/10/12 15:56:55

diff --git a/ClassLibrary1.Test/ScoreBoardTest.cs b/ClassLibrary1.Test/ScoreBoardTest.cs
index 543c14a..52ec67e 100644
--- a/ClassLibrary1.Test/ScoreBoardTest.cs
+++ b/ClassLibrary1.Test/ScoreBoardTest.cs
@@ -43,7 +43,23 @@ namespace ClassLibrary1.Test
             Assert.That(actual, Is.EqualTo(expected));
         }

+        [Test]
+        public void Player1とPlayer2にそれぞれ１ポイント追加したときにPlayer1は1ポイントPlayer2は1ポイントとなる()
+        {
+            int expected = 1;
+            ScoreBoard target = new ScoreBoard();
+            target.WonPoint(Player.Player1);
+            target.WonPoint(Player.Player2);
+
+            int actual1 = target.getScorePlayer(Player.Player1);
+            int actual2 = target.getScorePlayer(Player.Player2);
+
+            Assert.That(actual1, Is.EqualTo(expected));
+            Assert.That(actual2, Is.EqualTo(expected));
+

+        }
+

     }
 }
diff --git a/ClassLibrary1/ScoreBoard.cs b/ClassLibrary1/ScoreBoard.cs
index 52ffb20..788ec5a 100644
--- a/ClassLibrary1/ScoreBoard.cs
+++ b/ClassLibrary1/ScoreBoard.cs
@@ -31,8 +31,14 @@ namespace ClassLibrary1
         public void WonPoint(Player player)
         {

-            player1Score++;
-            player2Score++;
+            if (Player.Player1 == player)
+            {
+                player1Score++;
+            }
+            else
+            {
+                player2Score++;
+            }

         }
     }